javascript - How do I include a .gitignore file as part of my npm module? -


I am creating a NPM module which will generate a specific project template for some software projects. As such, when a developer installs my NPM module and runs it, I would love the program to create files and folders in a certain way.

A file that I would like to include in the project template .gitignore file because the software project is assuming that it will be tracked through git However, when I say "npm install" on my module , Then NPM converts all of my .gitignore files into .npmignore files. How can I ensure that my .gitignore files can not be tampered with by NPM when distributed to my module?

"post-text" itemprop = "text">

It seems that this is a known problem. The answer given below seems like a recommended approach if the problem or If the link is ever destroyed:

For us, I think a better solution is going to be a clear document, if the authors want to be used then their generators Name your files ## gitignore ##, which will be a value guitnor set on the same string jitgnor.

In this way, a file which is published as a template file in NPM. ##JitGunnor ## and will not be caught by NPM, but later it will be replaced with a string. Gitignore


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -