printer-notifications/node_modules/sorcery/bin/showHelp.js

13 lines
368 B
JavaScript
Raw Normal View History

2023-11-13 21:10:04 +00:00
var fs = require( 'fs' ),
path = require( 'path' );
module.exports = function ( stream ) {
fs.readFile( path.join( __dirname, 'help.md' ), function ( err, result ) {
var help;
if ( err ) throw err;
help = result.toString().replace( '<%= version %>', require( '../package.json' ).version );
( stream || process.stderr ).write( '\n' + help + '\n' );
});
};