uncomment-it
v1.0.1
Published
Uncomment html, js or css
Downloads
65
Maintainers
Readme
Uncomment html, js or css
NOTE: This is using regex and therefore is pretty fragile. Created for simplicity and perf reasons. Read more at https://github.com/sindresorhus/comment-regex/issues/1.
HINT: In order to make it work properly adjust some space around the comments might help.
Install
$ npm install --save uncomment-it
Usage
var uncommentIt = require('uncomment-it');
uncommentIt('<!--<div>a div</div>-->', 'html');
//=> <div>a div</div>
uncommentIt('// var test = \'test\'', 'js');
//=> var test = 'test'
uncommentIt('/*body {background: blue}*/', 'css');
//=> body {background: blue}
$ npm install --global uncomment-it
$ uncomment-it --help
Usage
uncomment-it <input-path> <type>
uncomment-it <input-path> <type> <output-path>
cat <input-path> | uncomment-it <type>
Example
uncomment-it index.html html
uncomment-it index.js js uncommented.html
cat index.css | uncomment-its css
cat index.html | uncomment-it html > uncommented.html
Options
-v, --verbose Verbose output
License
MIT © Steve Mao