M
M
Maxim Prikhodko2016-11-16 17:58:50
gulp.js
Maxim Prikhodko, 2016-11-16 17:58:50

Gulp stopped running?

Tell me how to solve the problem, I'm a beginner developer, I can't understand what's the matter...
Running 'default'...
[16:22:14] Using gulpfile ~\Desktop\Armata Time\gulpfile.js
[16:22:14] Starting 'styles'...
[16:22:14] Starting 'scripts'...
[16:22:14] Starting 'watch'...
[16:22:14] Finished 'watch' after 62 ms
[ 16:22:14] Finished 'scripts' after 231 ms

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Zolotykh, 2016-11-16
@zolotykh

gulp.task('default', ['browser-sync', 'watch']);
It's probably sequential.
But neither browser-sync nor watch returns a stream, nor does it execute the done function.
In my opinion, you need to either run browser-sync and watch in parallel, or redo:

gulp.task('browser-sync', ['styles', 'scripts'], function(done) {
  browserSync.init({
   server: {
     baseDir: "./app"
   },
   notify: false
  });

  done();
});

gulp.task('watch', function (done) {
  gulp.watch('sass/*.sass', ['styles']);
  gulp.watch('app/libs/**/*.js', ['scripts']);
  gulp.watch('app/js/*.js').on("change", browserSync.reload);
  gulp.watch('app/*.html').on('change', browserSync.reload);

  done();
});

A
Anton Bobylev, 2016-11-16
@dpigo

Try to see what falls and why. Hang an error handler on your tasks and look at the output.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question