nocat
v1.2.2
Published
NOde Cat - CLI tool to output raw file contents with syntax highlighting
Downloads
21
Maintainers
Readme
nocat
NOde compatible Cat.
Simple syntax highlighting for the console via the highlight.js library.
This module is compatible with a large quantity of languages and provides a number of styles.
Installation
Run the following to install:
sudo npm install -g nocat
Module usage
var nocat = require('nocat');
nocat
.on('file', function(file, mime, lang) {
console.log('Processing', file, '...');
})
.on('end', function(file, content) {
console.log(content);
})
.exec(program.args, {
color: true,
style: 'zenburn',
})
CLI Usage
Usage: nocat [files...]
Options:
-h, --help output usage information
-V, --version output the version number
-l, --lang [language] Force language setting. If unspecified it will be determined from mime
-n, --no-color Disable syntax highlighting and act like regular `cat`
-v, --verbose Be verbose
-s, --style [style] Set the output color style (default: sunburst)
--list-languages List available language highlighters
--list-styles List available styles