1.1.1 • Published 9 years ago
js-comment-replacer v1.1.1
js-comment-replacer
Replaces single line comments in js with block comments if appropriate.
E.g.:
//
// Request smth
//
// @param {mixed} array of smth
// @return {promise}
//
// single line comment
// ##################################
//
// Private methods
//
// #################################will turn into
/**
* Request smth
*
* @param {mixed} array of smth
* @return {promise}
*/
// single line comment
/**
* ##################################
*
* Private methods
*
* #################################
*/Usage
node index.js testFile.jsor
node index.js testfolder/Use -o outputfile to specify an outputfile instead of replacing the comments in the input file. (ignored on folders)
node index.js testFile.js -o testFile.parsed.jsor use -p prefix to specify a prefix attach to the processed file(s).
node index.js testFile.js -p parsedwill result in
testFile.js (unchanged)
testFile.parsed.js (parsed file)Use -h --help to display this options.
1.1.1
9 years ago