Skip to content

Commit

Permalink
chore: whitelist files to include when publishing
Browse files Browse the repository at this point in the history
1. Reduce the size of the final output.

2. Overall, a whitelist of files should be prefer over a blacklist to
   make things explicit about what exactly is going to be published.

Useful readings:
- https://docs.npmjs.com/cli/v6/configuring-npm/package-json#files
- https://docs.npmjs.com/cli/v6/commands/npm-publish
  • Loading branch information
MrChocolatine committed Oct 20, 2021
1 parent 780743a commit bf1979d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 33 deletions.
33 changes: 0 additions & 33 deletions .npmignore

This file was deleted.

Empty file removed addon/.gitkeep
Empty file.
Empty file removed app/.gitkeep
Empty file.
11 changes: 11 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,17 @@
"doc": "doc",
"test": "tests"
},
"files": [
"/addon",
"/app",
"/config/environment.js",
"/initializers",
"/instance-initializers",
"/services",
"/types",
"/index.js",
"/tsconfig.json"
],
"scripts": {
"build": "ember build --environment=production",
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"",
Expand Down

0 comments on commit bf1979d

Please sign in to comment.