Skip to content
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

Some glob patterns not possible with --include and --exclude #39

Closed
mstade opened this issue Sep 19, 2016 · 2 comments
Closed

Some glob patterns not possible with --include and --exclude #39

mstade opened this issue Sep 19, 2016 · 2 comments

Comments

@mstade
Copy link
Member

mstade commented Sep 19, 2016

Expected Behavior

@DimitarChristoff mentioned in his review of #37, that it should be possible to set an include (or exclude) pattern like this:

ez-build --include "js:**/*.{js,jsx}"

Current Behavior

Unfortunately, it seems that ez-build doesn't support {x,y} glob patterns, probably because it splits the patterns on , characters. Indeed, running the above command with DEBUG=1 shows the result of parsing the pattern:

$ DEBUG=1 ez-build --include "js:**/*.{js,jsx}"
...
# - include: {"js":["**/*.{js","jsx}"],"css":["jsx}"],"*":["jsx}"],"copy-files":["**/*"]}       src/main.js:27
...

This issue affects --exclude as well, as they use the same logic.

@DimitarChristoff
Copy link
Contributor

http://requirebin.com/?gist=384c1319fa264c8b5896c6db702c21b0 - though this relies on whatever file matching you pass it on to rely on regex matches for extension or whatever.

@DimitarChristoff
Copy link
Contributor

/.(js|jsx)$/, is popular also.

@mstade mstade mentioned this issue Sep 21, 2016
10 tasks
@mstade mstade closed this as completed in 0916a6c Sep 21, 2016
mstade added a commit that referenced this issue Sep 21, 2016
Fixed issue #39 – braced patterns not working with `--include`/`--exclude`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants