/usr/lib/nodejs/browserify-lite/cli.js is in node-browserify-lite 0.3.0-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | #!/usr/bin/nodejs
var fs = require('fs');
var browserifyLite = require('./');
var options = {};
for (var i = 2; i < process.argv.length; i += 1) {
var arg = process.argv[i];
if (arg === '--help') {
usage();
} else if (arg === '--outfile') {
if (++i >= process.argv.length) usage();
options.outBundlePath = process.argv[i];
} else if (arg === '--standalone') {
if (++i >= process.argv.length) usage();
options.standalone = process.argv[i];
} else if (!options.entrySourcePath) {
options.entrySourcePath = arg;
} else {
usage();
}
}
if (!options.outBundlePath || !options.entrySourcePath) {
usage();
}
browserifyLite.createBundle(options, function(err) {
if (err) throw err;
});
function usage() {
console.error(
"Usage: browserify-lite ./entry-file.js --outfile bundle.js\n" +
"\n" +
"Standard Options:\n" +
"\n" +
" --outfile Write the browserify bundle to this file\n" +
" --standalone xyz Export as window.xyz");
process.exit(1);
}
|