npm publish doesn't include some files #3571
Comments
From https://npmjs.org/doc/developers.html#Keeping-files-out-of-your-package
(Emphasis added.) |
Thank @domenic that's really helpful! I would however like to note, that "Keeping files out of your package" is probably the last place I'd have looked. May I also add, that it seems to me that npm has nothing to do with my .gitignore file, and shouldn't speculate on which files to add by looking at it. |
Hi all, just wanted to share a useful tip for developers who prefer not having to commit build output folders (like myself!) If you wish to publish your There is an implication, however, in that NPM can start publishing files that you wouldn't normally expect it to because they have always been elegantly detected in your |
- See npm issue for explanation npm/npm#3571 In short, files matched in .gitignore are ignored by npm publish if .npmignore is not found
from being published @see npm/npm#3571
Hey guys,
I've just decided to remove my prebuilt
dist/
files from my repository, since it was a pest to maintain and feels plain wrong. So I found theprepublish
script, which seems perfect, but problem is, that after I switched to useprepublish
mydist/
files doesn't get included when I do anpm publish
!My package.json:
But when I
npm publish
the files that the jade build command created in thedist/
folder doesn't get included!My
.gitignore
is set to ignore files indist
- I don't know if that has any influence, although I know that it oughtn't.The text was updated successfully, but these errors were encountered: