Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function produceMainBundle() {
var bundle = require('browserify')().add('./src/scripts/index.js');
bundle
.bundle()
.on('error', function (err) {
gutil.log(gutil.colors.red('Failed to browserify'), gutil.colors.yellow(err.message));
})
.pipe(fs.createWriteStream(path.join(__dirname + '/dist/bundle.js')));
}
gulp.task( 'scripts', function(){
return require('browserify')({
debug: true
})
.add('./test/public/js/app.js')
.bundle()
.pipe( fs.createWriteStream('./test/public/dist/app.js') );
});
gulp.task( 'build-dist', ['lint', 'clear-dist-dir'], function(){
return require('browserify')({
debug: true
})
.add('./standalone-build.js')
.bundle()
.pipe( fs.createWriteStream('./dist/gplaces.js') );
});
function(item) {
browserify.add(item.bundle, {expose: item.alias});
}
);
function runBrowserify() {
var fs = require('fs');
var bundle = require('browserify')()
.add('./src/scripts/index.js')
.bundle()
.on('error', function (err) {
gutil.log(gutil.colors.red('Failed to browserify'), gutil.colors.yellow(err.message));
});
bundle.pipe(fs.createWriteStream(path.join(__dirname + '/dist/bundle.js')));
}