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

Improve exclusion of files in minimatch #46

Open
marcooliveira opened this issue Jan 11, 2013 · 2 comments
Open

Improve exclusion of files in minimatch #46

marcooliveira opened this issue Jan 11, 2013 · 2 comments

Comments

@marcooliveira
Copy link
Member

marcooliveira commented Jan 11, 2013

Excluding files from a minimatch expression can be tricky, and the syntax can become a nightmare to read. Maybe we should come up with a simpler syntax?

If we take the cp example, we could support something like this:

files: {
  'src/**/*.js,!*.min.js': 'dst'
}

This would copy all the .js files, except those that end with .min.js, the exclamation mark being a negation (exclusion) operator, and the comma separating these. This expression could be composed of several comma separated expressions and, in order for a file to match, it would have to match ALL the expressions.

These sort of features should be provided in something like ctx.file, so that task creators don't have to do this by hand repetitively, and also it should be part of the automaton-lib. Check #45 for more information on this.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/98439-improve-exclusion-of-files-in-minimatch?utm_campaign=plugin&utm_content=tracker%2F39683&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F39683&utm_medium=issues&utm_source=github).
@marcooliveira
Copy link
Member Author

Check https://github.com/mklabs/node-fileset for ideas.

@marcooliveira
Copy link
Member Author

Big breakthrough for this issue in #50 (comment). This will be the base for improving exclusions.

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

1 participant