-
Notifications
You must be signed in to change notification settings - Fork 664
Description
Hi there!
I've noticed a limitation in the fileExclusionRegExp configuration option.
I'm using "Optimizing a Whole Project"-style compilation with a number of modules, and I'm having trouble specifying the set of files I'd like to copy over to the build directory.
Here's a simplified directory listing of my project:
/app/scripts/a.js
/app/scripts/b.js
/app/scripts/c.js
/tools/scripts/d.js
The Problem
During compilation, I would like a, b and c to be copied over but I'd like to ignore d.js as it is not intended for distribution.
- I tried
fileExclusionRegExp: /^scripts$/, but that excludes all 4. - I tried
fileExclusionRegExp: /tools\/scripts/, but that excludes none of the 4. - I've tried a few more similar permutations, but I couldn't figure out a way to include all files in /app/scripts without the files in /tools/scripts.
The Workaround
The only workaround I've been able to find is to rename /tools/scripts to something different. This feels kludgy to me; why shouldn't fileExclusionRegExp support multiple files or directories with the same name?
Potential Solutiosn
Some solutions come to mind, such as executing the provided RegExp on relative project paths (i.e. /app/scripts/a.js instead of scripts and a.js). Another idea would be to reinstate functionality for excluding particular directories.
Thanks!