I have a private module stored on github that I'm including in one of my projects using npm
. The module has a .npmignore
file, but nothing is being ignored when I install or update the module.
Project's package.json
{
"name": "Your Cool Project",
"version": "0.0.0",
"dependencies": {
"myModule" : "git+ssh://git@github.com:user/myModule.git",
/* All your other dependencies */
}
...
}
Module's .npmignore
file
.git*
gulpfile.js
index.html
tests.js
README.md
When I run npm update myModule
these files are still being downloaded into my project. Am I missing something? Does .npmignore
work for privately hosted modules? Thanks in advance.