HackerYou / chalk

5 stars 9 forks source link

Slow compile time for Readme #221

Closed swbloom closed 7 years ago

swbloom commented 7 years ago

Somewhere between the JS task and the BrowserSync reload, Readme compile time is slowing down.

It seems like the JS task compiles extremely quickly:

[22:52:11] Starting 'js'...
[22:52:11] Finished 'js' after 8.28 ms

Gulp ran 1 task in 8.91 ms

Task     Time  % of total  Finished
js    8.28 ms         93%       1st

but BS takes a while to notice the change:

[BS] Reloading Browsers...
[BS] Reloading Browsers...
[BS] 2 files changed (app.min.js.map, app.min.js)

Some thoughts:

gulp.task('default', ['styles', 'js','bs-client'], () => {
    gulp.watch('app/**/*.jsx',['js']);
    gulp.watch('app/components/app.min.js', reload); // is this line necessary, since we're watching for changes to app.min in the js task?
    gulp.watch(paths.srcCSS + '**/*.scss', ['styles']);
});
swbloom commented 7 years ago

added watchify. seems to have helped. will continue to monitor

Rchristiani commented 7 years ago

Going to close this issue for now, as it seems to be pretty good.