grunt-init icon indicating copy to clipboard operation
grunt-init copied to clipboard

gitignore turns into .npmignore after running grunt-init

Open redonkulus opened this issue 11 years ago • 3 comments

I have a template that contains a .gitignore in the root/ folder. After I run the grunt-init scaffolding, this file turns into a .npmignore file. Is this done intentionally? Possibly a way to turn this off?

Otherwise, I guess I will have to run script to rename it back.

redonkulus avatar Sep 07 '13 04:09 redonkulus

Hello, are you there? Same for me.

ghost avatar May 03 '14 16:05 ghost

Which template are you guys using @herby & @redonkulus?

jamesplease avatar May 03 '14 17:05 jamesplease

I have already found the reason. I (and @redonkulus, probably) use our own templates and publish them in npm. npm publish rewrites all .gitignore files into .npmignore files. When getting the package back from npm. the file is thus named .npmignore..

So, this should probably be in the entry in some FAQ: If you have template with .gitignore and upload it to npm, rename the file to, say, gitgnore-file and add a rule to rename.json.

James Smith wrote:

Which template are you guys using @herby https://github.com/herby & @redonkulus https://github.com/redonkulus?

— Reply to this email directly or view it on GitHub https://github.com/gruntjs/grunt-init/issues/58#issuecomment-42111212.

ghost avatar May 03 '14 17:05 ghost