Skip to content

Commit bd5d1c2

Browse files
committed
[meta] add npmignore and safe-publish-latest
1 parent 2e3fdef commit bd5d1c2

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ npm-debug.log
66
npm-shrinkwrap.json
77
package-lock.json
88
yarn.lock
9+
10+
.npmignore

package.json

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
"url": "https://github.com/crypto-browserify/browserify-rsa/issues"
77
},
88
"license": "MIT",
9-
"files": [
10-
"index.js"
11-
],
129
"main": "index.js",
1310
"repository": {
1411
"type": "git",
1512
"url": "https://github.com:crypto-browserify/browserify-rsa.git"
1613
},
1714
"scripts": {
15+
"prepack": "npmignore --auto --commentLines=autogenerated",
16+
"prepublish": "not-in-publish || npm run prepublishOnly",
17+
"prepublishOnly": "safe-publish-latest",
1818
"lint": "eslint --ext=js,mjs .",
1919
"pretest": "npm run lint",
2020
"test": "npm run tests-only",
@@ -31,7 +31,10 @@
3131
"@ljharb/eslint-config": "^21.1.1",
3232
"encoding": "^0.1.13",
3333
"eslint": "=8.8.0",
34+
"in-publish": "^2.0.1",
35+
"npmignore": "^0.3.1",
3436
"parse-asn1": "^5.1.7",
37+
"safe-publish-latest": "^2.0.0",
3538
"tape": "^5.9.0"
3639
},
3740
"engines": {
@@ -44,5 +47,13 @@
4447
"commitLimit": false,
4548
"backfillLimit": false,
4649
"hideCredit": true
50+
},
51+
"publishConfig": {
52+
"ignore": [
53+
".github/workflows",
54+
"test",
55+
".eslintrc",
56+
".github"
57+
]
4758
}
4859
}

0 commit comments

Comments
 (0)