jsx-syntaxhighlighter

0.1.0 • Public • Published

JSX Syntax Highlighter

JSX syntax highlighter based on Node friendly version of Alex Gorbachev's great SyntaxHighlighter.

Install

$ npm install node-syntaxhighlighter
$ npm install jsx-syntaxhighlighter

Usage

var nsh      =  require('node-syntaxhighlighter')
  , language =  require('jsx-syntaxhighlighter'); // usually load a bruns from nsh like : nsh.getLanguage('js')

    var code = require('fs').readFileSync('./example.jsx', 'utf-8');
    var result = nsh.highlight(code, language);

    console.log('Result:\n' + result);

Tests

npm test

Release History

  • 0.1.0

Readme

Keywords

Package Sidebar

Install

npm i jsx-syntaxhighlighter

Weekly Downloads

8

Version

0.1.0

License

MIT

Last publish

Collaborators

  • srekans