Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import gulp from 'gulp'
- gulp.task('compile:watch', (done) => {
- let watcher = gulp.watch('src/**/*.js');
- watcher.on('change', () => {
- gulp.src('src/**/*.js')
- .pipe(gulp.dest('dist'));
- });
- done();
- });
- gulp.task('callback', () => {
- console.log('hi!');
- });
- gulp.task('serve', ['compile:watch'], () => {
- gulp.watch('dist/**/*.js', ['callback']);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement