Skip to content

Commit c7fde3c

Browse files
author
zhiwen.zhao
committed
feat: 使用 np 进行发布
1 parent 7cf3a1d commit c7fde3c

File tree

5 files changed

+1218
-161
lines changed

5 files changed

+1218
-161
lines changed

.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
registry=https://registry.npmjs.org/

.yarnrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
registry=https://registry.npmjs.org/

package.json

+11
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,21 @@
33
"version": "1.0.0",
44
"description": "A React UI Library.",
55
"homepage": "https://github.com/worldzhao/react-ui-library-tutorial#readme",
6+
"publishConfig": {
7+
"access": "public",
8+
"registry": "https://registry.npmjs.org/"
9+
},
610
"typings": "lib/index.d.ts",
711
"main": "lib/index.js",
812
"module": "esm/index.js",
913
"authors": {
1014
"name": "worldzhao",
1115
"email": "[email protected]"
1216
},
17+
"files": [
18+
"lib",
19+
"esm"
20+
],
1321
"scripts": {
1422
"dev": "dumi dev",
1523
"start": "npm run dev",
@@ -19,6 +27,8 @@
1927
"clean": "rimraf lib esm dist",
2028
"build:types": "tsc -p tsconfig.build.json && cpr lib esm",
2129
"build": "npm run clean && npm run build:types && gulp",
30+
"prepublishOnly": "npm run build",
31+
"release": "np --no-cleanup --no-tests --any-branch",
2232
"commit": "git-cz",
2333
"test": "jest",
2434
"test:watch": "jest --watch",
@@ -99,6 +109,7 @@
99109
"jest": "^24.9.0",
100110
"less": "^3.10.3",
101111
"lint-staged": "^9.5.0",
112+
"np": "^7.5.0",
102113
"plop": "^2.6.0",
103114
"prettier": "^1.19.1",
104115
"react": "^16.8.0",

scripts/release.ts

-147
This file was deleted.

0 commit comments

Comments
 (0)