I have a file that is generated by npm install
command (using preinstall
task). I don't want to add it in the git repository, nor in the NPM project.
Supposing the file name is foo.json
, I added it in .gitignore
file as foo.json
.
Is this enough to avoid uploading it on NPM registry?
I know I can add .npmignore
file that will surely ignore the file, but I won't add it if .gitignore
already does this.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…