-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run watch
only to a specific directory
#3
Comments
Ah, this seems to be something of a bug. Basically, the way this plugin handles regex matching is a bit wrong, as it matches on the fully-qualified path to the file instead of matching against the relative path. In your example, if you change I'll try to re-design this plugin and get a fix out this week. Thanks for reporting the issue, and for the kind words :) |
Great! I had a look at the code, after your comment, to see if I could find/fix the issue myself, but it is way beyond my bash skills at the moment! |
Any luck on the issue? If you could pinpoint me to where this actually happens I could give it a try. I tried to weeks ago, but without luck. Thanks |
I haven't had a chance to look very far into this. The issue seems to be in the way we check for file changes here: https://github.com/ShaneKilkelly/manuel-contrib-watch/blob/master/manuel-contrib-watch.manuel#L43 It's been a while since I last dealt with this stuff, so I'm not totally sure what the right solution would look like. |
When watch is running with this config:
It looks for scss/js files in the current directory and subdirectories (current dir = dir with manuelfile).
Then, I have these two functions:
The SASS function works pretty nicely, but with the JS function I have an issue:
When manuel outputs the
dist/js/scripts.js
file, the watch function triggers itself again, because a JS file has changed. It then goes on an endless loop!Is it possible to specify which directory
watch
should check?I tried changing
[".*\.js"]="manuel js"
to["./source/js/*.js"]="manuel js"
but it didn't work.Ideas?
Thanks ;)
ps: I find manuel to be the finest task runner. Bash can be complicated, but the fact that I do not rely on gulp/grunt/npm is very nice. thnx!
The text was updated successfully, but these errors were encountered: