Browse Source

make stdout output possible

patch-2
Manuel Araoz 11 years ago
parent
commit
b696dae603
  1. 3
      browser/build.js

3
browser/build.js

@ -140,13 +140,14 @@ if (require.main === module) {
.version('0.0.1') .version('0.0.1')
.option('-a, --includeall', 'Include all submodules.') .option('-a, --includeall', 'Include all submodules.')
.option('-d, --dontminify', 'Don\'t minify the code.') .option('-d, --dontminify', 'Don\'t minify the code.')
.option('-o, --stdout', 'Specify output as stdout')
.option('-s, --submodules <items>', 'Include the listed comma-separated submodules.', list) .option('-s, --submodules <items>', 'Include the listed comma-separated submodules.', list)
.parse(process.argv); .parse(process.argv);
var bitcoreBundle = createBitcore(program); var bitcoreBundle = createBitcore(program);
var testBundle = createTestData(program); var testBundle = createTestData(program);
testBundle.pipe(fs.createWriteStream('browser/testdata.js')); testBundle.pipe(fs.createWriteStream('browser/testdata.js'));
bitcoreBundle.pipe(fs.createWriteStream('browser/bundle.js')); bitcoreBundle.pipe(program.stdout ? process.stdout : fs.createWriteStream('browser/bundle.js'));
} }
module.exports.createBitcore = createBitcore; module.exports.createBitcore = createBitcore;

Loading…
Cancel
Save