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

noProcess ignore files that start with . #91

Open
antonjb opened this issue Jan 29, 2015 · 0 comments
Open

noProcess ignore files that start with . #91

antonjb opened this issue Jan 29, 2015 · 0 comments

Comments

@antonjb
Copy link

antonjb commented Jan 29, 2015

Hello Grunt,

I'm running into an issue with a custom grunt-init template. The copyAndProcess method looks like this

init.copyAndProcess(files, props, {noProcess: '{.git,node_modules,.sass-cache,.tmp,build,modules,source}/**'});

There's reasons the node modules are kept inside the node_modules directory and not installed afterwards which isn't particularly relevant to this issue. When running the init it errors on a file deep within the dependencies of grunt-contrib-imagemin

node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-
gifsicle/node_modules/gifsicle/node_modules/bin-
build/node_modules/download/node_modules/decompress-tar/node_modules/strip-
dirs/node_modules/is-absolute/.verbrc.md...Warning: An error occurred while processing a template
(name is not defined). Use --force to continue.

Inside .verbrc.md is {%= name %} which is never set when you run the template. As a test I created a new folder and added a file called .test which contained {%= name %} and told grunt-init to not process that folder. It ignores the noProcess and changes the {%= name %} to the text set in prompt.

I would expect node_modules/** to ignore everything within that folder and copy the contents across without processing the templates, even if it started with a dot(.)

I've been able to get it working using the following:

init.copyAndProcess(files, props, {noProcess: '{.git,node_modules,.sass-cache,.tmp,build,modules,source}/**/{.,}*'});

But I still think the basic version of ignoring the folder should've worked. Am I missing something or is this an issue?

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

1 participant