Skip to content

Commit 3af9e5e

Browse files
committed
[meta] add npmignore
1 parent 0c74840 commit 3af9e5e

File tree

3 files changed

+17
-73
lines changed

3 files changed

+17
-73
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,5 @@ typings/
6464
npm-shrinkwrap.json
6565
package-lock.json
6666
yarn.lock
67+
68+
.npmignore

.npmignore

Lines changed: 0 additions & 68 deletions
This file was deleted.

package.json

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
"main": "index.js",
66
"sideEffects": false,
77
"scripts": {
8-
"version": "auto-changelog && git add CHANGELOG.md",
9-
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"",
8+
"prepack": "npmignore --auto --commentLines=autogenerated",
109
"prepublishOnly": "safe-publish-latest",
1110
"prepublish": "not-in-publish || npm run prepublishOnly",
1211
"pretest": "npm run lint",
@@ -16,7 +15,9 @@
1615
"tests:shims": "nyc tape --require=es5-shim --require=es5-shim 'test/**/*.js'",
1716
"tests:corejs": "nyc tape --require=core-js 'test/**/*.js'",
1817
"test": "npm run tests-only && npm run tests:shims && npm run tests:corejs",
19-
"posttest": "npx npm@\">= 10.2\" audit --production"
18+
"posttest": "npx npm@\">= 10.2\" audit --production",
19+
"version": "auto-changelog && git add CHANGELOG.md",
20+
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
2021
},
2122
"repository": {
2223
"type": "git",
@@ -54,13 +55,17 @@
5455
"eslint": "=8.8.0",
5556
"for-each": "^0.3.3",
5657
"in-publish": "^2.0.1",
58+
"npmignore": "^0.3.1",
5759
"nyc": "^10.3.2",
5860
"object-inspect": "^1.13.3",
5961
"safe-publish-latest": "^2.0.0",
6062
"safeset": "^1.0.1",
6163
"tape": "^5.9.0",
6264
"typescript": "next"
6365
},
66+
"engines": {
67+
"node": ">= 0.4"
68+
},
6469
"auto-changelog": {
6570
"output": "CHANGELOG.md",
6671
"template": "keepachangelog",
@@ -69,7 +74,12 @@
6974
"backfillLimit": false,
7075
"hideCredit": true
7176
},
72-
"engines": {
73-
"node": ">= 0.4"
77+
"publishConfig": {
78+
"ignore": [
79+
".github/workflows"
80+
]
81+
},
82+
"testling": {
83+
"files": "test/index.js"
7484
}
7585
}

0 commit comments

Comments
 (0)