1.0.7 • Published 3 years ago

react-native-template-umbappsample v1.0.7

Weekly downloads
-
License
-
Repository
-
Last release
3 years ago

📖 开始

执行项目构建

react-native init 你的项目名 --template umbappsample

打开到你的项目路径

cd 你项目的根路径

执行初始化项目并设置项目包名

node init 你的项目包名 *{platform: ios/android/}

执行打包脚本

node build {你的moduleName} {env: release/dev} {platform: ios/android}

在ProjectDir/outputs/找到你的module zip包并上传

📋 文件目录介绍

├── Readme.md                                  // this is me
├── analyze_rnerror                            // Bundle混淆查错脚本文件
│   ├── analyze.js                             // 分析脚本文件代码
│   └── start.sh                               // 运行报错分析脚本文件
├── android                                    // android 原生相关
├── ios                                        // iOS 原生相关
├── App.js                                     // RN Template 页面
├── babel.config.js                            // babel 配置
├── build.js                                   // 生成Bundle包是对应生成的脚本文件
├── index.js                                   // APP 模式Debug 加载的主入口
├── outputs                                    // 执行 build.js bundle 打包输出路径
├── node_modules                               // 依赖库
│   ├── @umb                                   // UMB 依赖库
│   │   ├── bundle-manager                     // UMB 多bundle管理模块
│   │   ├── main                               // APP 主包
│   │   ├── metro-bundle                       // UMB 多bundle打包配置
│   │   ├── metro-router                       // UMB 动态路由模块
│   │   ├── metro-storage                      // UMB 存储支持模块      
│   │   └── smart-assets                       // UMB 多Bundle图片加载支持 
│   ├── @peppas                                // peppas 库依赖
│   │   ├── barcode-scanner                    // peppas 扫码支持模块  
│   │   ├── debug-tools                        // peppas debug工具    
│   │   ├── meida-picker                       // peppas 媒体选择器 
│   │   ├── react-native-toast                 // peppas toast工具 
│   │   ├── remote-push                        // peppas 推送支持 
│   │   └── trace-event                        // peppas 埋点支持 
├── package.json
├── index_template.js                          // 当前RN代码主入口(以此为范例,开发编写自己的入口)
├── init.js                                    // APP初始化脚本(初始化及替换包名)
├── metro.config.js                            // react-native metro 支持配置 
└── *platform.confg.js                         // 打Main主包时运自动生成脚本配置文件 

⚠️ 注意

  • 使用build.js打包时需注意,moduleName与项目根路径下的index_${moduleName}.js保持一致

    例如:node build template release android,则在outputs/template.zip 则为具体包路径

    编译主Bundle包指令: node build platform release android

    Debug下编译非混淆Bundle包指令: node build platform dev android

🏴‍️ ChangeLog

1.0.5 更新内容: 优化项目结构路径,编写README.md

1.0.4 更新内容: 优化初始化脚本

📄 依赖库

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago