jLinux

Untitled

Dec 27th, 2015
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const gulp   = require('gulp');
  2. const babel  = require('gulp-babel');
  3.  
  4. const src = 'src/*.js';
  5. const dist = 'dist';
  6.  
  7. // Transpile from ES6 to ES5
  8. gulp.task( 'transpile', () => {
  9.     return gulp.src( src )
  10.         .pipe(babel({
  11.             presets: ['es2015']
  12.         }))
  13.         .pipe( gulp.dest( dist ) );
  14. });
  15.  
  16. gulp.task('default',[ 'transpile' ]
  17.     //, () => {return gulp.watch( src, ['transpile'])}
  18. );
Advertisement
Add Comment
Please, Sign In to add comment