Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const gulp = require('gulp');
- const watch = require('gulp-watch');
- const clean = require('gulp-clean');
- const shell = require('gulp-shell');
- //watch changes in folder containing .ts files, delete the current bundle.js and rebuild the new bundle
- gulp.task('build', function() {
- gulp.watch('src/js/components/**/*.ts', function(){
- gulp.src('dist/bundle.js', {read: false})
- .pipe(clean());
- gulp.src('/', {read: false})
- .pipe(shell([
- 'npm run build'
- ]));
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement