gulpfile.js
function continuousBundle() {
    const bundle = b => b.bundle()
        .on('error', (err) => {
            notifier.notify({
                title: 'Browserify Error',
                message: err.message,
            });
            gutil.log('Browserify Error', err);
        })
        .pipe(source('crudl.js'))
        .pipe(gulp.dest(dist))
        .on('end', () => {
            notifier.notify({
                title: 'Browserify',
                message: 'OK',
            });
        })
    const opts = assign({}, watchify.args, browersifyOptions, { debug: true });
    const bundler = watchify(browserify(opts).transform(babelify.configure(babelifyOptions)));
    bundler.on('update', () => bundle(bundler)); // on any dep update, runs the bundler
    bundler.on('log', gutil.log); // output build logs to terminal

    return bundle(bundler)
}
function continuousBundle() {
    const bundle = b => b.bundle()
        .on('error', (err) => {
            notifier.notify({
                title: 'Browserify Error',
                message: err.message,
            });
            gutil.log('Browserify Error', err);
        })
        .pipe(source('crudl.js'))
        .pipe(gulp.dest(dist))
        .on('end', () => {
            notifier.notify({
                title: 'Browserify',
                message: 'OK',
            });
        })
    const opts = assign({}, watchify.args, browersifyOptions, { debug: true });
    const bundler = watchify(browserify(opts).transform(babelify.configure(babelifyOptions)));
    bundler.on('update', () => bundle(bundler)); // on any dep update, runs the bundler
    bundler.on('log', gutil.log); // output build logs to terminal

    return bundle(bundler)
}
function continuousBundle ( ) { const bundle = b => b . bundle ( ) . on ( 'error' , ( err ) => { notifier . notify ( { title : 'Browserify Error' , message : err . message , } ) ; gutil . log ( 'Browserify Error' , err ) ; } ) . pipe ( source ( 'crudl.js' ) ) . pipe ( gulp . dest ( dist ) ) . on ( 'end' , ( ) => { notifier . notify ( { title : 'Browserify' , message : 'OK' , } ) ; } ) const opts = assign ( { } , watchify . args , browersifyOptions , { debug : true } ) ; const bundler = watchify ( browserify ( opts ) . transform ( babelify . configure ( babelifyOptions ) ) ) ; bundler . on ( 'update' , ( ) => bundle ( bundler ) ) ; // on any dep update, runs the bundler bundler . on ( 'log' , gutil . log ) ; // output build logs to terminal return bundle ( bundler ) }
Watch for changes and bundle
Watch for changes and bundle