diff --git a/.gitignore b/.gitignore index 1e3b179d..a63afe6d 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,5 @@ package-lock.json # coverage data coverage/ .nyc_output/ + +.npmignore diff --git a/.npmignore b/.npmignore deleted file mode 100644 index f156b8d7..00000000 --- a/.npmignore +++ /dev/null @@ -1,13 +0,0 @@ -# gitignore - -/node_modules - -# Only apps should have lockfiles -yarn.lock -package-lock.json - -# coverage data -coverage/ -.nyc_output/ - -.github/workflows diff --git a/package.json b/package.json index baf812c2..da09c10c 100644 --- a/package.json +++ b/package.json @@ -59,11 +59,13 @@ "falafel": "^2.2.4", "js-yaml": "^3.14.0", "npm-run-posix-or-windows": "^2.0.2", + "npmignore": "^0.3.0", "safe-publish-latest": "^2.0.0", "tap": "^8.0.1", "tap-parser": "^3.0.5" }, "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", "prepublishOnly": "safe-publish-latest", "prepublish": "!(type not-in-publish) || not-in-publish || npm run prepublishOnly", "prelint:files": "git ls-files 2>/dev/null | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git' || echo '*.md *.js test/*.js'", @@ -106,5 +108,10 @@ "email": "mail@substack.net", "url": "http://substack.net" }, - "license": "MIT" + "license": "MIT", + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } }