Advertisement
nlozovan

Untitled

Aug 22nd, 2018
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. gulp.task('browserify', function() {
  3.  
  4.      return browserify({ entries: ['./admin/js/init.js'] })
  5.  
  6.         .transform(babelify.configure({
  7.             presets: ["es2015"],
  8.             ignore: '/js/lib/',
  9.         }))
  10.  
  11.         .bundle()
  12.  
  13.         .on('error', function(err){
  14.             // print the error (can replace with gulp-util)
  15.             console.log(err.message);
  16.             console.log('Full error: ', err);
  17.             // end this stream
  18.             this.emit('end');
  19.         })
  20.  
  21.         .pipe(source('bundle.js'))
  22.         .pipe(gulp.dest('./admin/js/'))
  23.         .pipe(notify({ message: 'Bundle JS processed!'}));
  24.  
  25.         return;
  26.  
  27. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement