Skip to content

Added support for ignoring file patterns#3

Open
nelak wants to merge 1 commit intojarradseers:developfrom
upcompass:master
Open

Added support for ignoring file patterns#3
nelak wants to merge 1 commit intojarradseers:developfrom
upcompass:master

Conversation

@nelak
Copy link
Copy Markdown

@nelak nelak commented Mar 24, 2016

No description provided.

@jarradseers
Copy link
Copy Markdown
Owner

Cool - please can you update the README with this before I merge it in? thanks.

@Bonfims
Copy link
Copy Markdown

Bonfims commented Feb 14, 2019

how to use?

@rafaelassumpcao
Copy link
Copy Markdown

hey, @jarradseers are consign still accepting PRs?

this one would be very helpful... since it is pretty common to ignore files containing *.test.js for example.

anyway, I come with an alternative solution, ... but changing ignore flag for preserveBasename or something like that and just tests the regex against the basename instead of the extension only.
because with it, we keep the compatibility and open to do things like

consign({
  cwd: 'app', 
  extensions:['^(?!.*test\.js).*\.js$'], // regex  ignores *.test.js but will pass *.js files 
  preserveBasename: true // this is duo to path.extname(location) would be replaced by path.basename
})  

please let me know if we can invest time in it.

Thanks!

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

Successfully merging this pull request may close these issues.

4 participants