Skip to content

Commit d19716f

Browse files
Add publish-please to guide npm publishing
1 parent 056c54d commit d19716f

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

.publishrc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"validations": {
3+
"vulnerableDependencies": false,
4+
"uncommittedChanges": true,
5+
"untrackedFiles": true,
6+
"sensitiveData": true,
7+
"branch": "master",
8+
"gitTag": true
9+
},
10+
"confirm": true,
11+
"publishCommand": "npm publish",
12+
"publishTag": "latest",
13+
"prePublishScript": "npm run publish-please-prereqs",
14+
"postPublishScript": false
15+
}

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@
3636
"lint-demo": "tsc -p ./demo/tsconfig.json; eslint . --ext .js,.ts --parser-options=project:./demo/tsconfig.json",
3737
"lint-tests": "tsc -p ./tsconfig.test.json; eslint . --ext .js,.ts --parser-options=project:./tsconfig.test.json",
3838
"precommit": "pretty-quick --staged",
39+
"prepublish": "npx publish-please guard",
40+
"publish-please": "npx publish-please",
41+
"publish-please-prereqs": "npm run lint && npm run test && npm run build",
3942
"test": "jest --coverage",
4043
"travisci": "npm run lint && npm run test && codecov && npx snyk test"
4144
},

0 commit comments

Comments
 (0)