nyc-bookstores/node_modules/browserify/example/source_maps/build.js

11 lines
362 B
JavaScript
Raw Normal View History

2013-05-27 20:45:59 +00:00
var browserify = require('../..'),
path = require('path'),
fs = require('fs'),
bundlePath = path.join(__dirname, 'js', 'build', 'bundle.js');
browserify()
.require(require.resolve('./js/main.js'), { entry: true })
.bundle({ debug: true })
.on('error', function (err) { console.error(err); })
.pipe(fs.createWriteStream(bundlePath));