Skip to content

Commit 596d718

Browse files
committed
chore: update scripts.
1 parent d139258 commit 596d718

File tree

15 files changed

+56
-113
lines changed

15 files changed

+56
-113
lines changed

example/base/.pkgresolverc.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"@uiw/react-native": "../../packages/core/lib/index.js",
3+
"@uiw/react-native-image-picker": "../../packages/react-native-image-picker/lib/index.js"
4+
}

example/base/metro.config.js

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,2 @@
1-
/**
2-
* Metro configuration for React Native
3-
* https://github.com/facebook/react-native
4-
*
5-
*/
6-
7-
const path = require('path');
8-
9-
module.exports = {
10-
resolver: {
11-
extraNodeModules: {
12-
'@uiw/react-native': path.resolve(`${__dirname}/lib/`),
13-
'@uiw/react-native-image-picker': path.resolve(`${__dirname}/lib2/`),
14-
// '@uiw/react-native': path.resolve(`${__dirname}/../../packages/core/`),
15-
// 'react-native-svg': path.resolve(
16-
// `${__dirname}/../../node_modules/react-native-svg/`,
17-
// ),
18-
},
19-
},
20-
transformer: {
21-
getTransformOptions: async () => ({
22-
transform: {
23-
experimentalImportSupport: false,
24-
inlineRequires: true,
25-
},
26-
}),
27-
},
28-
};
1+
const conf = require('@uimjs/metro-config');
2+
module.exports = conf.default();

example/base/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"@babel/core": "~7.20.7",
2626
"@babel/runtime": "~7.20.7",
2727
"@react-native-community/eslint-config": "^2.0.0",
28+
"@uimjs/metro-config": "^1.0.2",
2829
"babel-jest": "^26.6.3",
2930
"eslint": "^7.32.0",
3031
"jest": "^26.6.3",
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"@uiw/react-native": "../../packages/core/lib/index.js",
3+
"@uiw/react-native-image-picker": "../../packages/react-native-image-picker/lib/index.js"
4+
}

example/examples/metro.config.js

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,2 @@
1-
/**
2-
* Metro configuration for React Native
3-
* https://github.com/facebook/react-native
4-
*
5-
* @format
6-
*/
7-
const path = require('path');
8-
9-
module.exports = {
10-
resolver: {
11-
extraNodeModules: {
12-
'@uiw/react-native': path.resolve(`${__dirname}/lib/`),
13-
'@uiw/react-native-image-picker': path.resolve(`${__dirname}/lib2/`),
14-
// '@uiw/react-native': path.resolve(`${__dirname}/../../packages/core/`),
15-
// 'react-native-svg': path.resolve(
16-
// `${__dirname}/../../node_modules/react-native-svg/`,
17-
// ),
18-
},
19-
},
20-
transformer: {
21-
getTransformOptions: async () => ({
22-
transform: {
23-
experimentalImportSupport: false,
24-
inlineRequires: true,
25-
},
26-
}),
27-
},
28-
};
1+
const conf = require('@uimjs/metro-config');
2+
module.exports = conf.default();

package.json

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,37 +3,11 @@
33
"private": true,
44
"scripts": {
55
"prepare": "husky install && cd ./test-ci && yarn install",
6-
"⬇️⬇️⬇️⬇️⬇️ example::examples ⬇️⬇️⬇️⬇️⬇️": "▼▼▼▼▼ example::examples ▼▼▼▼▼",
7-
"lib:build:examples": "lerna exec --scope @uiw/react-native -- tsbb build --disable-babel-option --no-esm --cjs ../../example/examples/lib",
8-
"lib:watch:examples": "lerna exec --scope @uiw/react-native -- tsbb watch --disable-babel-option --no-esm --cjs ../../example/examples/lib",
9-
"⬆️⬆️⬆️⬆️⬆️ example::examples ⬆️⬆️⬆️⬆️⬆️": "▲▲▲▲▲ example::examples ▲▲▲▲▲",
10-
"⬇️⬇️⬇️⬇️⬇️ doc ⬇️⬇️⬇️⬇️⬇️": "▼▼▼▼▼ example::examples ▼▼▼▼▼",
11-
"build:doc": "lerna exec --scope @uiw/react-native -- tsbb build --disable-babel-option --no-esm --cjs ../../website/src/react-native/lib",
12-
"watch:doc": "lerna exec --scope @uiw/react-native -- tsbb watch --disable-babel-option --no-esm --cjs ../../website/src/react-native/lib",
13-
"watch:doc1": "lerna exec --scope @uiw/react-native -- tsbb watch --disable-babel-option --no-esm --cjs ../../website/lib",
14-
"⬆️⬆️⬆️⬆️⬆️ doc ⬆️⬆️⬆️⬆️⬆️": "▲▲▲▲▲ example::examples ▲▲▲▲▲",
15-
"⬇️⬇️⬇️⬇️⬇️ example::base ⬇️⬇️⬇️⬇️⬇️": "▼▼▼▼▼ example::base ▼▼▼▼▼",
16-
"lib:build:base": "lerna exec --scope @uiw/react-native -- tsbb build --disable-babel-option --no-esm --cjs ../../example/base/lib",
17-
"lib:watch:base": "lerna exec --scope @uiw/react-native -- tsbb watch --disable-babel-option --no-esm --cjs ../../example/base/lib",
18-
"⬆️⬆️⬆️⬆️⬆️ example::base ⬆️⬆️⬆️⬆️⬆️": "▲▲▲▲▲ example::base ▲▲▲▲▲",
196
"⬇️⬇️⬇️⬇️⬇️ test-ci ⬇️⬇️⬇️⬇️⬇️": "▼▼▼▼▼ example::base ▼▼▼▼▼",
20-
"lib:build:test": "lerna exec --scope @uiw/react-native -- tsbb build --disable-babel-option --no-esm --cjs ../../test-ci/src/lib",
21-
"lib:watch:test": "lerna exec --scope @uiw/react-native -- tsbb watch --disable-babel-option --no-esm --cjs ../../test-ci/src/lib",
227
"test": "cd ./test-ci && npm run test",
238
"⬆️⬆️⬆️⬆️⬆️ test-ci ⬆️⬆️⬆️⬆️⬆️": "▲▲▲▲▲ example::base ▲▲▲▲▲",
24-
"watch": "npm run lib:watch & npm run lib:watch:base & npm run lib:watch:examples & npm run lib:watch:test & npm run watch:doc & npm run lib:watch:image-picker & npm run lib:watch:examples:image-picker & npm run lib:watch:base:image-picker",
25-
"build": "npm run lib:build && npm run lib:build:base && npm run lib:build:examples && npm run lib:build:test && npm run build:doc && npm run lib:build:image-picker && npm run lib:build:examples:image-picker && npm run lib:build:base:image-picker",
269
">>>>>>>": ">>>>>>>",
27-
"lib:build": "lerna exec --scope @uiw/react-native -- tsbb build --disable-babel-option --no-esm",
28-
"lib:watch": "lerna exec --scope @uiw/react-native -- tsbb watch --disable-babel-option --no-esm",
29-
"⬇️⬇️⬇️⬇️⬇️ image-picker ⬇️⬇️⬇️⬇️⬇️": "▼▼▼▼▼ example::base ▼▼▼▼▼",
30-
"lib:build:image-picker": "lerna exec --scope @uiw/react-native-image-picker -- tsbb build --disable-babel-option --no-esm",
31-
"lib:watch:image-picker": "lerna exec --scope @uiw/react-native-image-picker -- tsbb watch --disable-babel-option --no-esm",
32-
"lib:build:examples:image-picker": "lerna exec --scope @uiw/react-native-image-picker -- tsbb build --disable-babel-option --no-esm --cjs ../../example/examples/lib2",
33-
"lib:watch:examples:image-picker": "lerna exec --scope @uiw/react-native-image-picker -- tsbb watch --disable-babel-option --no-esm --cjs ../../example/examples/lib2",
34-
"lib:build:base:image-picker": "lerna exec --scope @uiw/react-native-image-picker -- tsbb build --disable-babel-option --no-esm --cjs ../../example/base/lib2",
35-
"lib:watch:base:image-picker": "lerna exec --scope @uiw/react-native-image-picker -- tsbb watch --disable-babel-option --no-esm --cjs ../../example/base/lib2",
36-
"⬆️⬆️⬆️⬆️⬆️ image-picker ⬆️⬆️⬆️⬆️⬆️": "▲▲▲▲▲ example::base ▲▲▲▲▲",
10+
"build": "lerna exec --scope @uiw/react-native --scope @uiw/react-native-image-picker -- npm run build",
3711
"start": "lerna exec --scope website -- npm run start",
3812
"doc": "lerna exec --scope website -- npm run build",
3913
"<<<<<<<": "<<<<<<<",
@@ -61,7 +35,7 @@
6135
"lerna": "^7.0.0",
6236
"prettier": "^2.7.1",
6337
"pretty-quick": "^3.1.3",
64-
"tsbb": "3.7.6",
38+
"tsbb": "^4.1.7",
6539
"typescript": "^4.7.4"
6640
},
6741
"resolutions": {

packages/core/.babelrc

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

packages/core/package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,13 @@
55
"homepage": "https://uiwjs.github.io/react-native-uiw/",
66
"main": "lib/index.js",
77
"types": "lib/index.d.ts",
8-
"scripts": {},
8+
"scripts": {
9+
"watch": "npm run start",
10+
"start": "tsbb watch src/*.tsx & npm run copy:watch",
11+
"copy": "tsbb copy \"lib/**/*.{js,md,d.ts,png}\" --output ../../website/src/react-native",
12+
"copy:watch": "tsbb copy \"lib/**/*.{js,md,d.ts,png}\" --output ../../website/src/react-native --watch",
13+
"build": "tsbb build src/*.tsx && npm run copy"
14+
},
915
"keywords": [
1016
"uiw",
1117
"react-native",

packages/core/src/Button/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ export default Demo
218218

219219
| 属性 | 说明 | 类型 | 默认值 |
220220
| --- | --- | --- | --- |
221-
| color | 自定义颜色 | `string` | -
221+
| color | 自定义颜色 | `string` | - |
222222
| disabled | 是否禁用 | `boolean` | `false` |
223223
| bordered | 设置是否显示边框 | `boolean` | `true` |
224224
| loading | 加载状态 | `boolean` | `false` |

packages/react-native-image-picker/.babelrc

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

0 commit comments

Comments
 (0)