2

I have a gulp script that watches for code changes in all javascript files. It looks like this:

gulp.watch(['./**/*.jsx', './**/*.js'], ['build:react']);

So, it watches for all .js and .jsx files from root directory, but I want to ignore node_modules directory. How can I do that ?

Jozef Cipa
  • 2,133
  • 3
  • 15
  • 29

1 Answers1

0

You ca use gulp unwatch This removes the folder specified from your pipe. However, it's generally a good idea to have a source folder that gulp watches instead of the project root folder (then the .git directory and all sorts will be caught up in your task.

TechnicalTophat
  • 1,655
  • 1
  • 15
  • 37