Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel elixir calling task according to watch expression

Say we have this (simplified) elixir in gulpfile.js:

mix
.bower()
.less('test.less');

The problem is then whenever any file is changed, both bower and less tasks are executed.
Is there a way to only execute less when a file in a certain watch path has changed and only execute bower when for example the bower.json file has changed?

The real problem is that with other tasks, my watch process is becoming extremely slow and bower is running everytime I update a less file (which is irrelevant).

Thanks!

like image 331
Jad Joubran Avatar asked Jul 15 '15 19:07

Jad Joubran


1 Answers

As Jeffrey Way explained here

This is indeed a problem with the bower task. So I'm assuming it's also the case with imagemin.

I'll create a new task and open source it soon and update this answer.

like image 154
Jad Joubran Avatar answered Sep 18 '22 18:09

Jad Joubran