Hi,
Been bashing my head against a wall thinking I'm doing something stupid but, I can't figure out why I get constant CPU usage using Gulp watch().
I see "node.exe" takes 2-5% CPU all the time Gulp's watch is running.
Node -v = v0.10.25
Gulp -v = 3.5.2
Windows 8.1
I have pretty standard code I think. Anyone seen this or can help debug why this is happening?
gulp.task('watch', function () {
var server = livereload();
gulp.watch(config.scripts_lib, ['scripts_lib_dev']).on('change', function (file) {
server.changed(file.path);
});
gulp.watch(config.scripts_app, ['scripts_app_dev']).on('change', function (file) {
server.changed(file.path);
});
gulp.watch(config.templates, ['templates_dev']).on('change', function (file) {
server.changed(file.path);
});
});
gulp.task('scripts_lib_dev', function () {
return gulp.src(config.scripts_libs)
.pipe(concat('foo.lib.js'))
.pipe(gulp.dest('static/js'));
});
gulp.task('scripts_app_dev', function () {
return gulp.src(config.scripts_app)
.pipe(concat('foo.app.js'))
.pipe(gulp.dest('static/js'));
});
gulp.task('templates_dev', function () {
return gulp.src(config.templates)
.pipe(templateCache({
standalone: true,
module: 'foo.templates'
}))
.pipe(concat('foo.templates.js'))
.pipe(gulp.dest('static/js'));
});
Where config is an object is lists of paths.
scripts_libs = 12 file paths
scripts_app = 13 file paths
templates = selector "static/js/app/*/.html"
Hi,
Been bashing my head against a wall thinking I'm doing something stupid but, I can't figure out why I get constant CPU usage using Gulp watch().
I see "node.exe" takes 2-5% CPU all the time Gulp's watch is running.
Node -v = v0.10.25
Gulp -v = 3.5.2
Windows 8.1
I have pretty standard code I think. Anyone seen this or can help debug why this is happening?
Where config is an object is lists of paths.
scripts_libs = 12 file paths
scripts_app = 13 file paths
templates = selector "static/js/app/*/.html"