diff --git a/.gitignore b/.gitignore index 2da00f1..b510609 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 dcca2f5..0000000 --- a/.npmignore +++ /dev/null @@ -1,14 +0,0 @@ -# gitignore - -node_modules - -# Only apps should have lockfile -npm-shrinkwrap.json -package-lock.json -yarn.lock - -coverage/ -.nyc_output/ - -test/* -.github/workflows diff --git a/package.json b/package.json index dd9b7b2..6a801e1 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "license": "MIT", "main": "index.js", "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", "prepublish": "not-in-publish || npm run prepublishOnly", "prepublishOnly": "safe-publish-latest", "pretest": "npm run lint", @@ -39,6 +40,7 @@ "aud": "^2.0.2", "eslint": "=8.8.0", "in-publish": "^2.0.1", + "npmignore": "^0.3.0", "nyc": "^10.3.2", "safe-publish-latest": "^2.0.0", "tape": "^5.6.3" @@ -63,5 +65,11 @@ }, "engines": { "node": ">= 0.4" + }, + "publishConfig": { + "ignore": [ + ".github/workflows", + "test/" + ] } }