asdf-games/node_modules/browserify/example/source_maps/build.js

14 lines
378 B
JavaScript

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,
debug: true
})
.bundle()
.on('error', function (err) { console.error(err); })
.pipe(fs.createWriteStream(bundlePath));