Closed philipwalton closed 9 years ago
I am also interested in a way to keep sourcemaps in separate files.
If you use the programatic API, you can pass a function or a stream for the respective "output" options, instead of a filename.
The output arguments are also available to outpipe for command-line usage:
browserify files/*.js \
-p [ ../ -o 'uglifyjs -cm | gzip > bundle/`basename $FILE`.gz' ] \
| uglifyjs -cm | gzip > bundle/common.js.gz
https://github.com/substack/factor-bundle#command-line-outpipe-example
I found the factor.pipeline
event to be helpful with using exorcist and the API.
b.on('factor.pipeline', function (file, pipeline) {
pipeline.get('wrap').push(exorcist(path.join('build', path.basename(file) + '.map')));
});
... or is there a way to get access to the write stream of the output files instead of having them write to disk by default?