node.jsterminalsyntaxhighlighter

nodejs syntax highlighter to terminal in nodejs


For this new nodejs debugger I am working on I would like to colorize the source-code lines that are displayed. Any recommendations on a npm to use?

There are a lot of syntax highlighters out there, but what makes this situations a little different is

  1. The output is a to a terminal; it is not rendered in a browser
  2. I only need to colorize nodejs; so although handling 20 million other languages as well may be cool, it is not needed here and it adds code bloat. (I can handle adding code bloat very well enough on my own, thank you.)

I see node-syntaxhighlighter but the lack of links to a github page or documentation kind of troubles me.


Solution

  • Starting with release 0.1.5 I use consolehighlighter.