Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to make Gulp stop watching files

How do you stop files from being watched?

I have not seen the method in the docs which seems a bit odd to me.

like image 343
Richard Avatar asked Feb 03 '14 16:02

Richard


People also ask

How does Gulp Watch work?

The Watch method is used to monitor your source files. When any changes to the source file is made, the watch will run an appropriate task. You can use the 'default' task to watch for changes to HTML, CSS, and JavaScript files.


2 Answers

It's not a gulp thing. Gulp is just running as a never ending process.

The way to abort a process is Ctrl+C.

like image 156
Sindre Sorhus Avatar answered Sep 30 '22 12:09

Sindre Sorhus


According the official document. you can using returned stream method to stop it.

let watchStream = gulp-watch(paths, function(){}) watchStream.close()

like image 31
stackFish Avatar answered Sep 30 '22 13:09

stackFish