E
E
Extramezz2016-06-25 11:40:08
JavaScript
Extramezz, 2016-06-25 11:40:08

Why is gulp.watch taking a long time to start?

There is this code:

gulp.task("watchLibraries", function(){

  //For JS
  gulp.watch(["assets/js/libraries/**/*.js", "!**/*.min.js"]).on("change", function(event){
    compileJs(event.path); //Сжимает js-код
  });

  //For CSS
  gulp.watch(["assets/js/libraries/**/*.css", "!**/*.min.css"]).on("change", function(event){
    compileCss(event.path); //Сжимает CSS код
  });

});

I call a task.
gulp watchLibraries
And I get something like this:
cfa6ae43581a44e9ba17e7ea6a51e4bf.png
Why does watch take so long to start? 20 - 150 seconds? There are 30 files to be monitored. What could be the matter? I'm most likely misunderstanding how chokidar works...

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question