From 26272693147d68ec3ae2216b1f3ac5d30b79b3da Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Fri, 5 Aug 2022 11:44:05 -0700 Subject: [PATCH] [meta] use `npmignore` to autogenerate an npmignore file --- .gitignore | 2 ++ .npmignore | 13 ------------- package.json | 7 +++++++ 3 files changed, 9 insertions(+), 13 deletions(-) delete mode 100644 .npmignore diff --git a/.gitignore b/.gitignore index 058a156..e1249a8 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,5 @@ yarn.lock coverage .nyc_output + +.npmignore diff --git a/.npmignore b/.npmignore deleted file mode 100644 index 3864d77..0000000 --- a/.npmignore +++ /dev/null @@ -1,13 +0,0 @@ -# gitignore - -node_modules - -# Only apps should have lockfiles -npm-shrinkwrap.json -package-lock.json -yarn.lock - -coverage -.nyc_output - -.github/workflows diff --git a/package.json b/package.json index 439dcd9..9c5fe35 100755 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "test": "test" }, "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", "prepublish": "not-in-publish || npm run prepublishOnly", "prepublishOnly": "safe-publish-latest", "pretest": "npm run lint", @@ -53,6 +54,7 @@ "eslint": "=8.8.0", "has-symbols": "^1.0.3", "has-typed-arrays": "^1.0.1", + "npmignore": "^0.3.0", "nyc": "^10.3.2", "object.getownpropertydescriptors": "^2.1.4", "safe-publish-latest": "^2.0.0", @@ -123,5 +125,10 @@ }, "browser": { "assert.js": false + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] } }