Closed jkrems closed 4 years ago
Is "files" a new thing of npm? I thought that ignoring files was always done using an .npmignore
file.
Yep, it's potentially a two-step process: Everything in files
but what is ignored via .npmignore
. I personally prefer using files
most of the time because it's harder to accidentally publish files. But happy to update this PR to use .npmignore
.
See: https://docs.npmjs.com/files/package.json#files
P.S.: Sorry, misread your "new". Not sure how new it is. I'm actually not sure when it was added. But it's definitely working with npm 2.
👍 Any chance of merging this PR :)
The
tests
directory is pretty big. This changes selects which files to publish explicitly.npm
will automatically include README, LICENSE, and CHANGELOG files.Before:
After: