-1

Is it a good idea if I set a gulp watcher for e.g. /**/*.less on the root folder of my project, rather than on the folder containing the .less files? The root folder may contain a large amount of files (node_modules, CMS Data, etc.).

The benefit would be flexibility in where to place the less folder without changing any paths in the config with the goal of eliminating the config completely.

The alternative would be searching for the lowest common ancestor starting from root, but I imagine this a heavy task.

Philipp Gfeller
  • 1,167
  • 2
  • 15
  • 36
  • *"The root folder may contain a large amount of files "* -> you just told why it looks like a dangerous practice (what if there's some .less file in some node_module ?). Don't you have a src folder or something ? – Denys Séguret Jan 04 '16 at 17:11

1 Answers1

1

Sounds like something danger idea. Your project possibly has node_modules folder and bower_components one and maybe some other which are you don't want to track. Are you sure you want to watch changes to all those folders and start your tasks each time their content has been changed?

Andrew
  • 1,474
  • 4
  • 19
  • 27