printer-notifications/node_modules/sorcery/bin/showHelp.js
2023-11-13 16:10:04 -05:00

13 lines
368 B
JavaScript

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' );
});
};