Closed Elfayer closed 7 years ago
@Elfayer gulp-tsc
create file to keep tree. since watch
see new file in the tree created, it relaunch new task, before other is appearing. In order to prevent gulp-tsc
from create new script each time it compile you could add property keepTree: false
to you options.
var gulp = require('gulp');
var typescript = require('gulp-tsc');
gulp.task('compileTS', function() {
gulp.src(['**/*.ts', '!node_modules/**'])
.pipe(typescript({
target: 'ES5',
keepTree: false
}))
.pipe(gulp.dest('.'));
});
gulp.task('watch:ts', function() {
gulp.watch(['**/*.ts', '!node_modules/**'], ['compileTS']);
});
I guess i did something wrong, but I don't understand why starting with :
I end up with : (I had to stop the script from running, otherwise it never stops adding files and folders)
While the file is correctly compiled...
Here is my script :
I just ran the
gulp watch:ts
command.