Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server only restarts if I run gulp with gulp default "default" command #58

Open
DJviolin opened this issue Jul 15, 2016 · 0 comments
Open

Comments

@DJviolin
Copy link

DJviolin commented Jul 15, 2016

I have the following Gulpfile:

const server = gls.new([
  '--trace-deprecation', '--trace-sync-io', 'bin/www',
]);
gulp.task('start', () => {
  return server.start();
});

...

gulp.task('app', gulp.parallel('start', 'css', 'uglify', 'files'));

gulp.task('watch:start', () => {
  //gulp.watch(paths.app, gulp.series('start'), server.start); // restart my server
  gulp.watch(paths.app, gulp.series('start'), (file) => {
    server.notify.apply(server, [file]);
  });
});

...

gulp.task('watch', gulp.parallel('watch:start', 'watch:stylus', 'watch:css', 'watch:uglify', 'watch:files'));

gulp.task('default', gulp.parallel('app', 'watch'));

If I run gulp default, the server only restart one times only, at the first when I do any modifications for example in my app.js. Meanwhile, if I re-save multiple times my main.styl file, it will re-compile the minified CSS every single time, works as expected.

I had to run gulp default "default" to be responsive every server restart, but than I run every command two times, which I think is wasting.

I running Gulp 4 now, but it was the same with Gulp 3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant