New to node.js, trying to use highlight.js as a command line utility

57 views
Skip to first unread message

Duncan Mackenzie

unread,
Jun 14, 2016, 12:52:16 PM6/14/16
to highlight.js
We are using highlight.js on our web pages (like this: https://dotnet.github.io/api/System.Collections.Generic.Dictionary%602.html#System_Collections_Generic_Dictionary_2), but I'd like to experiment with doing the highlighting at build time instead of in the browser.

I understand it is possible to use from node.js on the server, but we are using a variety of command line tools to build our files, so I was wondering if anyone could help me understand how to do something like this from a command line: node highlight_js input.html output.html

Syntax of the command was just to try to make it clear what I'm trying to do, not suggesting it would need to work like that. Basically wondering if I can script the npm install, then call the module on an HTML file, all from the command line.

Thanks!
Reply all
Reply to author
Forward
0 new messages