Skip to content

Commit fff04cb

Browse files
authored
Use files array in package.json instead of .npmignore (#692)
Whitelists are better than blacklists. Tested to ensure the same files are bundled with `npm pack`.
1 parent 7a8424e commit fff04cb

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

.npmignore

Lines changed: 0 additions & 11 deletions
This file was deleted.

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@
5353
"standard": "^12.0.1"
5454
},
5555
"main": "./lib/index.js",
56+
"files": [
57+
"lib/",
58+
"!lib/**/__tests__/"
59+
],
5660
"scripts": {
5761
"full-ci": "npm run lint && npm run coverage",
5862
"coverage": "istanbul cover -i 'lib/**' -x '**/__tests__/**' test.js",

0 commit comments

Comments
 (0)