function bundleWithBrowserify() { return watchFrontendJs.bundle() .on('error', gutil.log.bind(gutil, 'Browserify Error')) .pipe(source('bundle.js')) .pipe(gulp.dest(paths.build.frontendJs)) .pipe(browserSync.stream()); }
// triggers the build of jsx files from bundler function bundle(){ return bundler .bundle() .on('error', gutil.log.bind(gutil, 'Browserify Error')) .pipe(source('bundle.js')) .pipe(gulp.dest('./public/')); }
gulp.task('default', function() { var bundler = watchify(browserify({ entries: ['./src/js/app.jsx'], transform: ['reactify'], extensions: ['.jsx'], debug: true, cache: [], fullPaths: true })); function build(file) { if (file) gutil.log('Recompiling ' + file) return bundler .bundle() .on('error', gutil.log.bind(gutil, 'Browserify Error')) .pipe(source('main.js')) .pipe(gulp.dest('./')); }; build() bundler.on('update', build) });
function bundle(){ return w.bundle() // log errors if they happen .on('error', gutil.log.bind(gutil, 'Browserify Error')) .pipe(source(config.outputName)) .pipe(gulp.dest(config.dest)) // .pipe(connect.reload()); .pipe(livereload()); }
function bundle() { return bundler.bundle() // log errors if they happen .on('error', gutil.log.bind(gutil, 'Browserify Error')) .pipe(source(config.outputName)) .pipe(gulp.dest(config.dest)) .pipe(connect.reload()); }
function bundle() { return bundler.bundle() // log errors if they happen .on('error', gutil.log.bind(gutil, 'Browserify Error')) .pipe(source(config.outputName)) .pipe(gulp.dest(config.dest)) .pipe(connect.reload()); }
gulp.task('default', function() { var bundler = watchify(browserify({ entries: ['./src/app.jsx'], transform: [reactify], extensions: ['.jsx'], debug: true, cache: {}, packageCache: {}, fullPaths: true })); function build(file) { if (file) { gulpUtil.log('Rcompiling: ' + file); } return bundler .bundle() .on('error', gulpUtil.log.bind(gulpUtil, 'browserify error')) .pipe(source('main.js')) .pipe(gulp.dest('./')); }; build(); bundler.on('update', build); });
//creating bundler object responsible for running browserify on my base code gulp.task("default",function(){ var bundler=watchify(browserify({ entries:["./src/script.jsx"], transform:[reactify], extensions:[".jsx"], debug:"true", cache:{}, packageCache:{}, fullPaths:true })); //build file which executes my build file function build(file){ if(file)gulpUtil.log("recompiling"+file); return bundler .bundle() .on("error",gulpUtil.log.bind(gulpUtil,"browserify error")) .pipe(source("main.js")) .pipe(gulp.dest("./")); } build(); bundler.on("update", build); });
gulp.task('default', function() { // create bundler and pass it some options var bundler = watchify(browserify({ entries: ['./src/app.jsx'], transform: [reactify], extensions: ['.jsx'], debug: true, cache: {}, packageCache: {}, fullPaths: true })); // Activate Bundler and tell it what to do function build(file) { if (file) gutil.log('Recompiling ' + file); return bundler .bundle() .on('error', gutil.log.bind(gutil, 'Browserify Error')) // find any browserify error and log it in console .pipe(source('main.js')) // output .pipe(gulp.dest('./')); }; build() bundler.on('update', build) // whenever our files are u[dated build files again });