Skip to content

Commit 6153cd7

Browse files
committed
chore: 使用 pnpm workspace 管理项目,并升级第三方依赖
1 parent d162f17 commit 6153cd7

File tree

14 files changed

+21299
-53688
lines changed

14 files changed

+21299
-53688
lines changed

.husky/commit-msg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
pnpm commitlint -E HUSKY_GIT_PARAMS

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
pnpm lint-staged

lerna.json

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

package.json

Lines changed: 38 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -9,56 +9,54 @@
99
"url": "[email protected]:nervjs/taro-ui.git"
1010
},
1111
"license": "MIT",
12-
"workspaces": {
13-
"packages": [
14-
"packages/taro-ui",
15-
"packages/taro-ui-demo",
16-
"packages/taro-ui-docs"
17-
]
18-
},
1912
"scripts": {
20-
"bootstrap": "lerna bootstrap",
21-
"build": "lerna run build",
22-
"build:component": "lerna run --scope taro-ui build",
23-
"clean": "lerna run clean",
24-
"clean:component": "lerna run --scope taro-ui clean",
25-
"publish": "lerna publish from-git --yes"
13+
"bootstrap": "pnpm i",
14+
"build": "pnpm -r --filter=./packages/* run build",
15+
"build:component": "pnpm run --scope taro-ui build",
16+
"clean": "rm -rf node_modules packages/*/node_modules",
17+
"clean:component": "pnpm remove --scope taro-ui clean",
18+
"publish": "lerna publish from-git --yes",
19+
"prepare": "husky install"
2620
},
2721
"devDependencies": {
28-
"@commitlint/cli": "^8.3.5",
29-
"@commitlint/config-conventional": "^8.3.4",
30-
"eslint-config-taro": "~3.0.2",
31-
"@typescript-eslint/eslint-plugin": "^5.20.0",
32-
"@typescript-eslint/parser": "^5.20.0",
33-
"conventional-changelog-cli": "^2.0.31",
34-
"cross-env": "^7.0.2",
35-
"eslint": "^8.12.0",
22+
"@babel/core": "^7.22.11",
23+
"@babel/plugin-proposal-class-properties": "^7.18.6",
24+
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
25+
"@babel/preset-env": "^7.22.10",
26+
"@babel/preset-react": "^7.22.5",
27+
"@commitlint/cli": "^8.3.6",
28+
"@commitlint/config-conventional": "^8.3.6",
29+
"@types/react": "^18.2.21",
30+
"@types/react-dom": "^18.2.7",
31+
"@typescript-eslint/eslint-plugin": "^5.62.0",
32+
"@typescript-eslint/parser": "^5.62.0",
33+
"autoprefixer": "9.8.8",
34+
"conventional-changelog-cli": "^2.2.2",
35+
"cross-env": "^7.0.3",
36+
"eslint": "^8.48.0",
3637
"eslint-config-o2team": "^0.1.7",
37-
"eslint-config-prettier": "^6.10.1",
38-
"eslint-import-resolver-custom-alias": "^1.2.0",
39-
"eslint-plugin-import": "^2.20.2",
40-
"eslint-plugin-prettier": "^3.1.2",
41-
"eslint-plugin-react": "^7.19.0",
42-
"eslint-plugin-react-hooks": "^3.0.0",
43-
"husky": "^4.2.3",
44-
"lerna": "^3.20.2",
45-
"lint-staged": "^10.1.2",
46-
"prettier": "^2.0.3",
38+
"eslint-config-prettier": "^6.15.0",
39+
"eslint-config-taro": "~3.6.15",
40+
"eslint-import-resolver-custom-alias": "^1.3.2",
41+
"eslint-plugin-import": "^2.28.1",
42+
"eslint-plugin-prettier": "^3.4.1",
43+
"eslint-plugin-react": "^7.33.2",
44+
"eslint-plugin-react-hooks": "^4.6.0",
45+
"husky": "^8.0.0",
46+
"lint-staged": "^10.5.4",
47+
"prettier": "^2.8.8",
48+
"react": "^18.2.0",
49+
"react-dom": "^18.2.0",
4750
"rimraf": "^3.0.2",
48-
"stylelint": "^15.10.1",
51+
"stylelint": "^15.10.3",
4952
"stylelint-config-standard": "^20.0.0",
50-
"stylelint-scss": "^3.16.0",
51-
"typescript": "~4.1.0"
53+
"stylelint-scss": "^3.21.0",
54+
"tslib": "2.5.0",
55+
"typescript": "~4.1.6"
5256
},
5357
"resolutions": {
5458
"sharp": "^0.28.3"
5559
},
56-
"husky": {
57-
"hooks": {
58-
"pre-commit": "lint-staged",
59-
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
60-
}
61-
},
6260
"lint-staged": {
6361
"*.{js,jsx,ts,tsx}": "eslint --quiet --cache --fix",
6462
"src/**/*.scss": "stylelint --syntax scss --fix"

packages/taro-ui-demo-rn/package.json

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"css": "sass"
1717
},
1818
"scripts": {
19-
"build": "yarn run build:rn",
19+
"build": "pnpm run build:rn",
2020
"build:weapp": "taro build --type weapp",
2121
"build:swan": "taro build --type swan",
2222
"build:alipay": "taro build --type alipay",
@@ -25,14 +25,14 @@
2525
"build:rn": "taro build --type rn",
2626
"build:qq": "taro build --type qq",
2727
"build:quickapp": "taro build --type quickapp",
28-
"dev:weapp": "yarn run build:weapp --watch",
29-
"dev:swan": "yarn run build:swan --watch",
30-
"dev:alipay": "yarn run build:alipay --watch",
31-
"dev:tt": "yarn run build:tt --watch",
32-
"dev:h5": "yarn run build:h5 --watch",
33-
"dev:rn": "yarn run build:rn --watch",
34-
"dev:qq": "yarn run build:qq --watch",
35-
"dev:quickapp": "yarn run build:quickapp --watch",
28+
"dev:weapp": "pnpm run build:weapp --watch",
29+
"dev:swan": "pnpm run build:swan --watch",
30+
"dev:alipay": "pnpm run build:alipay --watch",
31+
"dev:tt": "pnpm run build:tt --watch",
32+
"dev:h5": "pnpm run build:h5 --watch",
33+
"dev:rn": "pnpm run build:rn --watch",
34+
"dev:qq": "pnpm run build:qq --watch",
35+
"dev:quickapp": "pnpm run build:quickapp --watch",
3636
"clean": "rimraf .temp dist"
3737
},
3838
"browserslist": [
@@ -49,14 +49,11 @@
4949
"@tarojs/runtime": "3.6.5-canary.1",
5050
"@tarojs/taro": "3.6.5-canary.1",
5151
"@tarojs/taro-rn": "3.6.5-canary.1",
52-
"react": "^18.2.0",
53-
"react-dom": "^18.2.0",
5452
"react-native": "^0.71.6",
5553
"react-native-modal": "^13.0.0",
56-
"taro-ui": "3.1.0-beta.4"
54+
"taro-ui": "workspace:taro-ui@*"
5755
},
5856
"devDependencies": {
59-
"@babel/core": "^7.8.0",
6057
"@react-native-picker/picker": "^1.15.0",
6158
"@tarojs/cli": "3.6.5-canary.1",
6259
"@tarojs/mini-runner": "3.6.5-canary.1",

0 commit comments

Comments
 (0)