Skip to content

Commit 3b4fa76

Browse files
committed
chore: make taro-ui can build
1 parent f30a432 commit 3b4fa76

File tree

12 files changed

+57
-294
lines changed

12 files changed

+57
-294
lines changed

packages/taro-ui/config/dev.js

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

packages/taro-ui/config/index.js

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

packages/taro-ui/config/prod.js

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

packages/taro-ui/config/rollup.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export default {
5454
}),
5555
RollupJson(),
5656
RollupTypescript({
57-
tsconfig: NodePath.resolve(__dirname, 'tsconfig.rollup.json')
57+
tsconfig: resolveFile('tsconfig.rollup.json')
5858
}),
5959
RollupCopy({
6060
targets: [

packages/taro-ui/config/tsconfig.build.json

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

packages/taro-ui/config/tsconfig.rollup.json

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

packages/taro-ui/package.json

Lines changed: 5 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,13 @@
2929
},
3030
"license": "MIT",
3131
"scripts": {
32-
"dev:weapp": "yarn run build:weapp -- --watch",
33-
"dev:qq": "yarn run build:qq -- --watch",
34-
"dev:h5": "yarn run build:h5 -- --watch",
35-
"dev:swan": "yarn run build:swan -- --watch",
36-
"dev:alipay": "yarn run build:alipay -- --watch",
3732
"dev:doc": "yarn run build:h5-static && node ./build/dev-server",
38-
"build:weapp": "taro build --type weapp",
39-
"build:qq": "taro build --type qq",
40-
"build:h5": "taro build --type h5",
41-
"build:swan": "taro build --type swan",
42-
"build:alipay": "taro build --type alipay",
43-
"build:lib": "tsc --project ./config/tsconfig.build.json",
33+
"build": "yarn run build:rollup && yarn run build:lib",
34+
"build:lib": "tsc --project ./tsconfig.build.json",
4435
"build:rollup": "rollup --config ./config/rollup.config.js",
45-
"build:component": "yarn run build:rollup && yarn run build:lib",
4636
"build:h5-static": "yarn run build:h5 && node ./build/build-static",
4737
"build:doc": "yarn run build:h5-static && node ./build/build-docs",
48-
"prepublishOnly": "yarn run clean && yarn run build:component",
38+
"prepublishOnly": "yarn run clean && yarn run build",
4939
"lint": "eslint ./src --fix",
5040
"lint:style": "stylelint \"src/**/*.scss\" --syntax scss",
5141
"lint:style-fix": "stylelint \"src/**/*.scss\" --syntax scss --fix",
@@ -62,118 +52,23 @@
6252
"prop-types": "^15.7.2"
6353
},
6454
"devDependencies": {
65-
"@babel/core": "^7.0.0",
66-
"@babel/plugin-proposal-class-properties": "^7.0.0",
67-
"@babel/plugin-proposal-decorators": "^7.8.3",
68-
"@babel/plugin-proposal-object-rest-spread": "^7.0.0",
69-
"@babel/plugin-transform-react-jsx": "^7.0.0",
70-
"@babel/preset-env": "^7.0.0",
71-
"@babel/preset-typescript": "^7.9.0",
72-
"@commitlint/cli": "^8.2.0",
73-
"@commitlint/config-conventional": "^8.2.0",
74-
"@mapbox/jsxtreme-markdown-loader": "^0.8.3",
7555
"@rollup/plugin-commonjs": "^11.0.2",
7656
"@rollup/plugin-json": "^4.0.2",
7757
"@rollup/plugin-node-resolve": "^7.1.1",
78-
"@tarojs/cli": "^3.0.0-beta.2",
7958
"@tarojs/components": "^3.0.0-beta.2",
80-
"@tarojs/mini-runner": "^3.0.0-beta.2",
81-
"@tarojs/plugin-babel": "^2.0.3",
82-
"@tarojs/plugin-csso": "^2.0.3",
83-
"@tarojs/plugin-sass": "^2.0.3",
84-
"@tarojs/plugin-uglifyjs": "^2.0.3",
8559
"@tarojs/react": "^3.0.0-beta.2",
86-
"@tarojs/router": "^2.0.3",
8760
"@tarojs/taro": "^3.0.0-beta.2",
88-
"@tarojs/taro-h5": "^2.0.3",
89-
"@tarojs/webpack-runner": "^2.0.3",
9061
"@types/classnames": "^2.2.9",
62+
"@types/node": "^13.11.0",
9163
"@types/react": "^16.9.23",
9264
"@types/react-dom": "^16.9.5",
93-
"@types/webpack-env": "^1.13.6",
94-
"@typescript-eslint/eslint-plugin": "^2.10.0",
95-
"@typescript-eslint/parser": "^2.10.0",
96-
"at-ui-style": "^1.5.1",
97-
"autoprefixer": "^9.0.2",
98-
"babel-core": "^7.0.0-0",
99-
"babel-eslint": "^10.0.3",
100-
"babel-jest": "23.6.0",
101-
"babel-loader": "^8.0.0",
102-
"babel-plugin-syntax-dynamic-import": "^6.18.0",
103-
"babel-plugin-transform-class-properties": "^6.24.1",
104-
"babel-plugin-transform-decorators-legacy": "^1.3.4",
105-
"babel-plugin-transform-object-rest-spread": "^6.26.0",
106-
"babel-preset-env": "^1.6.1",
107-
"chalk": "^3.0.0",
108-
"classnames": "^2.2.6",
109-
"clean-webpack-plugin": "^3.0.0",
110-
"commitlint": "^8.2.0",
111-
"conventional-changelog-cli": "^2.0.11",
112-
"copy-to-clipboard": "^3.0.8",
113-
"copy-webpack-plugin": "^5.0.5",
114-
"cross-env": "^7.0.0",
115-
"css-loader": "^3.2.1",
116-
"eslint": "^6.7.2",
117-
"eslint-config-o2team": "^0.1.6",
118-
"eslint-config-prettier": "^6.10.0",
119-
"eslint-config-taro": "^2.0.3",
120-
"eslint-plugin-import": "^2.12.0",
121-
"eslint-plugin-jest": "^23.1.1",
122-
"eslint-plugin-prettier": "^3.1.2",
123-
"eslint-plugin-react": "^7.8.2",
124-
"eslint-plugin-react-hooks": "^2.1.1",
125-
"favicons-webpack-plugin": "2.1.0",
126-
"file-loader": "^5.0.2",
127-
"front-matter": "^3.0.2",
128-
"fs-extra": "^8.1.0",
129-
"glob": "^7.1.2",
130-
"highlight.js": "^9.12.0",
131-
"html-webpack-plugin": "^3.2.0",
132-
"html-withimg-loader": "^0.1.16",
133-
"husky": "^4.0.3",
134-
"jest": "23.6.0",
135-
"json-loader": "^0.5.7",
136-
"lint-staged": "^9.5.0",
137-
"loader-utils": "^1.1.0",
138-
"markdown-it": "^10.0.0",
139-
"markdown-it-container": "^2.0.0",
140-
"markdown-it-react-loader": "1.0.0",
141-
"mini-css-extract-plugin": "^0.9.0",
142-
"nerv-server": "^1.5.1",
143-
"nerv-test-utils": "^1.5.1",
144-
"nervjs": "^1.5.6",
145-
"ora": "^4.0.3",
146-
"postcss": "^7.0.2",
147-
"postcss-loader": "^3.0.0",
148-
"prettier": "^1.19.1",
149-
"qrcode.react": "^1.0.0",
15065
"react": "^16.13.0",
15166
"react-dom": "^16.13.0",
152-
"react-markdown-loader": "^1.1.14",
153-
"react-router-dom": "^5.1.2",
154-
"regenerator-runtime": "^0.13.3",
155-
"rimraf": "^3.0.2",
15667
"rollup": "^2.3.1",
15768
"rollup-plugin-copy": "^3.3.0",
15869
"rollup-plugin-typescript2": "^0.27.0",
15970
"rollup-plugin-visualizer": "^4.0.2",
160-
"sass-loader": "^8.0.0",
161-
"simulant": "^0.2.2",
162-
"source-map-loader": "^0.2.4",
163-
"stylelint": "^13.0.0",
164-
"stylelint-config-standard": "^20.0.0",
165-
"stylelint-scss": "^3.2.0",
166-
"terser": "^4.4.2",
167-
"ts-loader": "^6.2.2",
168-
"typescript": "^3.8.3",
169-
"url-loader": "^3.0.0",
170-
"vue": "^2.6.11",
171-
"webpack": "^4.42.1",
172-
"webpack-bundle-analyzer": "^3.6.1",
173-
"webpack-cli": "^3.3.11",
174-
"webpack-dev-server": "^3.1.5",
175-
"webpack-merge": "^4.1.3",
176-
"yaml-loader": "^0.5.0"
71+
"typescript": "^3.8.3"
17772
},
17873
"peerDependencies": {
17974
"@tarojs/components": ">=3.0.0-beta.2",

packages/taro-ui/tsconfig.build.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"extends": "../../tsconfig.build",
3+
"compilerOptions": {
4+
"target": "es2017",
5+
"module": "es6",
6+
"outDir": "./lib"
7+
},
8+
"include": [
9+
"src/**/*"
10+
]
11+
}

packages/taro-ui/tsconfig.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"extends": "../../tsconfig",
3+
"compilerOptions": {
4+
"target": "es2017",
5+
"module": "commonjs",
6+
"baseUrl": "./",
7+
"typeRoots": [
8+
"node_modules/@types",
9+
"types"
10+
]
11+
}
12+
}

packages/taro-ui/tsconfig.rollup.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"extends": "../../tsconfig.build",
3+
"compilerOptions": {
4+
"target": "es5",
5+
"module": "es6",
6+
"downlevelIteration": true,
7+
"baseUrl": ".",
8+
"types": ["node"]
9+
},
10+
"include": [
11+
"src/**/*"
12+
]
13+
}

0 commit comments

Comments
 (0)