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 eb4ac383..58b49a06 100644 --- a/package.json +++ b/package.json @@ -40,11 +40,13 @@ "falafel": "^2.2.5", "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'", @@ -86,5 +88,10 @@ "funding": { "url": "https://github.com/sponsors/ljharb" }, - "license": "MIT" + "license": "MIT", + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } }