rafalg's avatar

Watch a different directory than default

I use Laravel 5.2 with Elixir 5.0. When my SASS files are in default location, gulp watch works fine for me. But I added a new theme that I need to keep elsewhere (./resources/assets/themes/custom) and when I do that, gulp watch doesn't see file changes.

All the solutions to this problem I found are for an older version of Elixir - they say to use a method elixir.config.registerWatcher() which is no longer available. I read about an alternative to this method in the release notes, but that's for custom gulp tasks.

I did actually try creating such a task and it worked twice, but then gulp started showing a lot of unexpected output - I think I made it recursive, because my custom task was calling the default task in which it was created.

Is there a way to specify which directories should be watched?

0 likes
2 replies
WebKenth's avatar
WebKenth
Best Answer
Level 16

Put your theme folder in the sass folder? :P

from

resources/assets/themes/custom

to

resources/assets/sass/themes/custom
rafalg's avatar

That worked! Such a simple solution.

It pains me a little that my scripts and images are in the sass folder now, but I can live with a little pain ;)

Thanks WebKenth!

Please or to participate in this conversation.