Closed
Description
TypeScript Version:
1.8.9
tsconfig.json
{
"compilerOptions": {
"target": "es5",
"module": "amd",
"noEmitOnError": true,
"allowJs": true
},
"exclude": [
"node_modules",
"bower_components"
]
}
gulp task
var ts = require("gulp-typescript"),
var tsProject = ts.createProject("tsconfig.json", {
noExternalResolve: true,
typescript: require("typescript")
});
gulp.task("scripts", function() {
return gulp.src(paths.devroot.ts)
.pipe(ts(tsProject))
.pipe(gulp.dest(paths.webroot.app));
});
gulp.task("watch", ["scripts"], function() {
gulp.watch(paths.devroot.ts, ["scripts"]);
})
When I run the task with --allowJs set to true, it takes about 10seconds to build my project. Moreover it takes 10 seconds after any change in my files, ie it is not incrementaly.
When --allowJs is disabled, it takes about 1 second to build the whole project, and 100ms to build incrementally.