tsrntemp 1.0.0 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -18
- package/package.json +2 -1
- package/template.config.js +4 -0
package/README.md
CHANGED
@@ -1,23 +1,21 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
> > > components`公用组件文件夹`
|
8
|
-
|
9
|
-
> > > config`配置文件夹`
|
10
|
-
|
11
|
-
> > > iconfont`图标字体文件夹`
|
12
|
-
|
13
|
-
> > > pages`所有页面文件夹`
|
14
|
-
|
15
|
-
> > > route`路由页面文件夹`
|
1
|
+
#### 本模板使用TS
|
2
|
+
### 使用方法
|
3
|
+
```
|
4
|
+
npx react-native init ProjectName --template tsrntemp
|
5
|
+
```
|
16
6
|
|
17
|
-
> > > types`类型申明文件夹`
|
18
7
|
|
19
|
-
> > > utils`工具类文件夹`
|
20
8
|
|
9
|
+
- 文件目录
|
10
|
+
- src
|
11
|
+
- assets`静态资源文件夹`
|
12
|
+
- components`公用组件文件夹`
|
13
|
+
- config`配置文件夹`
|
14
|
+
- iconfont`图标字体文件夹`
|
15
|
+
- pages`所有页面文件夹`
|
16
|
+
- route`路由页面文件夹`
|
17
|
+
- types`类型申明文件夹`
|
18
|
+
- utils`工具类文件夹`
|
21
19
|
|
22
20
|
|
23
21
|
##### 新增路由须配置两个地方
|
@@ -34,7 +32,6 @@ export type RootStackParamList = {
|
|
34
32
|
```
|
35
33
|
import BottomTab from "route/BottomTab" //引入所需组件
|
36
34
|
|
37
|
-
|
38
35
|
const RouteArr: Array<RouteType> = [
|
39
36
|
{
|
40
37
|
name: 'BottomTab', //匹配第一步配置时的名称
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "tsrntemp",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.3",
|
4
4
|
"private": false,
|
5
5
|
"scripts": {
|
6
6
|
"android": "react-native run-android",
|
@@ -11,6 +11,7 @@
|
|
11
11
|
},
|
12
12
|
"keywords": ["react-native","template"],
|
13
13
|
"homepage": "https://github.com/wanngzelin/RNTemplate",
|
14
|
+
|
14
15
|
"dependencies": {
|
15
16
|
"@react-native-masked-view/masked-view": "^0.2.6",
|
16
17
|
"@react-navigation/bottom-tabs": "^6.3.1",
|