Skip to content

Commit 7a137d7

Browse files
committed
[meta] add npmignore and safe-publish-latest
1 parent 5c02918 commit 7a137d7

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ node_modules
44
npm-shrinkwrap.json
55
package-lock.json
66
yarn.lock
7+
8+
.npmignore

package.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
"description": "abstract base class for crypto-streams",
55
"main": "index.js",
66
"scripts": {
7+
"prepack": "npmignore --auto --commentLines=autogenerated",
8+
"prepublishOnly": "safe-publish-latest",
9+
"prepublish": "not-in-publish || npm run prepublishOnly",
710
"lint": "eslint --ext=js,.mjs .",
811
"pretest": "npm run lint",
912
"test": "npm run tests-only",
@@ -31,8 +34,16 @@
3134
"devDependencies": {
3235
"@ljharb/eslint-config": "^21.1.1",
3336
"eslint": "=8.8.0",
37+
"in-publish": "^2.0.1",
38+
"npmignore": "^0.3.1",
39+
"safe-publish-latest": "^2.0.0",
3440
"tape": "^5.9.0"
3541
},
42+
"publishConfig": {
43+
"ignore": [
44+
".github/workflows"
45+
]
46+
},
3647
"engines": {
3748
"node": ">= 0.10"
3849
}

0 commit comments

Comments
 (0)