-
Notifications
You must be signed in to change notification settings - Fork 146
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
Watch multiple destinations #199
Comments
Correction: it does build, but there is no output on the console. Watching, however, does not work. No changes to the files are detected so it never rebuilds the bundles. |
Looks like the issue is that the task is run once for each destination, and since I'm using the keepalive option, only the first destination is ever watched. Changes are detected appropriately for the first but not for the others. Updated the issue title to reflect this. |
I was able to solve for this using the grunt-concurrent plugin and some JS functions for building paths. I am close to having an example I can show. I will post one when it's ready. |
I'm having the same problem, only the first destination is being watched. |
+1 I'm having the same problem. |
+1 I'm also having the same problem. It appears that each file will affect only one of the bundles that they appear in. I think. |
+1 ! |
I would appreciate a solution, too. |
+1 ... |
Hey @chrisjaure and @f03lipe, I'd like to take a look at this.. Do you have a test environment to share so I can start somewhere? |
@tleunen Here's a basic setup: https://gist.github.com/chrisjaure/25af865ffb6561adca22 Run Thanks for looking into this. |
@tleunen Did you ever get anywhere with this? |
If you use the example in https://github.com/jmreidy/grunt-browserify/tree/master/examples/watch and use the 'browserifyWithWatch' task browserify will correctly watch multiple bundles. Using As some have noted the problem is that when you specify |
Sorry I'm quite busy these days.. I'll be more available in 2 weeks and will be able to take a look. |
I made a change in my fork. Could you test it a bit before I merge it in the main repo? |
@tleunen Looks like that did the trick! Thanks a bunch! Some notes:
|
Before, it was printing |
When a file changes, I see:
Isn't it enough to show just the first two messages since it's implied the bundle is being watchified when the task is first run? But that's fine if you can't differentiate between first creation and subsequent creations. I can deal with a little extra noise :) |
I merged the watchifying message with the bundle created message. Is it better? :)
|
👍 |
I'm trying to build bundles with dynamic mappings but it doesn't appear to be working.
For example, instead of specifying
src
anddest
, I'm using a dynamic mapping like this:This allows me to generate multiple bundles matching the src pattern. This used to work in an earlier version. Is it not supported anymore?
The text was updated successfully, but these errors were encountered: