You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a good reason for throwing the non-match error on line 221 in the multiGlob code? My specific use case is setting up a static-compiler to copy any miscellaneous .js files that get created in my main app tree.
Most work is done in coffeescript, so I build coffeescript into /scripts and then do a merge-trees on the static-compiler which pulls ['app/**/*.js', 'components/**/*.js','modules/**/*.js']. I'm doing this because I'm working with a developer who is learning javascript for the first time, whom I want to be able to contribute to the project without the overhead of also learning coffeescript. I know it's not really the best design strategy, but there it is. So, in future-proofing my Brocfile, I've found that unless there's at least one match for the multiGlob, It'll throw an exception which halts the entire build.
My workaround (which works fine for now) is to make sure that there is an empty foo.js file in each of the three trees, but that seems a bit excessive.
Would it be amiss to add an allowEmpty or some such option on the multiGlob options object? It's a bit weird, since that would be the only option that isn't there just to be passed in to node-glob. Alternatively, I'm not really certain why the exception needs to be thrown in the first place - are there other bits of functionality which would break if a multiglob returned an empty paths array?
The text was updated successfully, but these errors were encountered:
Any updates on this? I'm having the same issues. Trying to create a generic builder using broccoli that may or may not have some of the files and this keeps throwing errors.
Is there a good reason for throwing the non-match error on line 221 in the multiGlob code? My specific use case is setting up a static-compiler to copy any miscellaneous .js files that get created in my main app tree.
Most work is done in coffeescript, so I build coffeescript into /scripts and then do a merge-trees on the static-compiler which pulls
['app/**/*.js', 'components/**/*.js','modules/**/*.js']
. I'm doing this because I'm working with a developer who is learning javascript for the first time, whom I want to be able to contribute to the project without the overhead of also learning coffeescript. I know it's not really the best design strategy, but there it is. So, in future-proofing my Brocfile, I've found that unless there's at least one match for the multiGlob, It'll throw an exception which halts the entire build.My workaround (which works fine for now) is to make sure that there is an empty foo.js file in each of the three trees, but that seems a bit excessive.
Would it be amiss to add an allowEmpty or some such option on the multiGlob options object? It's a bit weird, since that would be the only option that isn't there just to be passed in to node-glob. Alternatively, I'm not really certain why the exception needs to be thrown in the first place - are there other bits of functionality which would break if a multiglob returned an empty paths array?
The text was updated successfully, but these errors were encountered: