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

Filter not working as expected #119

Open
Arwid opened this issue Jun 26, 2017 · 1 comment
Open

Filter not working as expected #119

Arwid opened this issue Jun 26, 2017 · 1 comment

Comments

@Arwid
Copy link

Arwid commented Jun 26, 2017

Thank you for this useful tool! Here's one issue I came across:

Problem
I expected this to work:

ncp 'public/', '.tmp',
    filter: new RegExp "/assets/(css|js)($|\/)"

But the filter seems to also be used to decide which directories to go into

public: # doesn't match regex, so the following tree isn't looked at:
- public/assets
- public/assets/css 
- public/assets/css/app.css # should match filter but it never gets here

Suggestion
Don't prune by using filter to decide which directories to go into. Only test filenames, as mentioned in the readme. Or add a note about this limitation.

@simonseyock
Copy link

Hey i solved this with new RegExp("/assets(/(css|js)($|\/)|$)")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants