Advertisement
Guest User

Untitled

a guest
Feb 24th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. const gulp = require('gulp');
  2. const watch = require('gulp-watch');
  3. const clean = require('gulp-clean');
  4. const shell = require('gulp-shell');
  5.  
  6. //watch changes in folder containing .ts files, delete the current bundle.js and rebuild the new bundle
  7. gulp.task('build', function() {
  8. gulp.watch('src/js/components/**/*.ts', function(){
  9. gulp.src('dist/bundle.js', {read: false})
  10. .pipe(clean());
  11. gulp.src('/', {read: false})
  12. .pipe(shell([
  13. 'npm run build'
  14. ]));
  15. });
  16. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement