From 7d19b159dc07d759f173971d31a76f8bb3352ea1 Mon Sep 17 00:00:00 2001 From: Marcin Dobosz Date: Sat, 2 Jun 2018 13:07:20 -0700 Subject: [PATCH] Use "files" package.json field instead of npmignore The npmignore file excludes some items, but is not exhaustive and a lot of artifacts still get packaged up, leading to a package that currently takes up to 4.4 MB on disk. You could keep adding entries to npmignore but it's easy to miss things as the build process evolves. With this change the on-disk size is down to a little over 200KB. This includes `/src` plus `CHANGELOG`, `LICENSE`, `package.json`, and `README` (https://docs.npmjs.com/files/package.json#files). Fixes https://github.com/auth0/node-auth0/issues/271 --- .npmignore | 6 ------ package.json | 3 +++ 2 files changed, 3 insertions(+), 6 deletions(-) delete mode 100644 .npmignore diff --git a/.npmignore b/.npmignore deleted file mode 100644 index ad55c06dd..000000000 --- a/.npmignore +++ /dev/null @@ -1,6 +0,0 @@ -examples -test -docs -scripts -.* -*.md diff --git a/package.json b/package.json index 801c67a50..b0e7daf86 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,9 @@ "version": "2.10.0", "description": "SDK for Auth0 API v2", "main": "src/index.js", + "files": [ + "src" + ], "scripts": { "test": "mocha -R spec $(find ./test -name *.tests.js)", "test:ci":