|
|
2 дней назад | |
|---|---|---|
| android | 2 дней назад | |
| assets | 2 дней назад | |
| config | 2 дней назад | |
| ios | 2 дней назад | |
| licenses | 2 дней назад | |
| patches | 2 дней назад | |
| src | 2 дней назад | |
| test | 2 дней назад | |
| Gemfile | 2 дней назад | |
| Gemfile.lock | 2 дней назад | |
| LICENSE | 2 дней назад | |
| NOTICE | 2 дней назад | |
| README.md | 2 дней назад | |
| babel.config.js | 2 дней назад | |
| commitlint.config.js | 2 дней назад | |
| global.d.ts | 2 дней назад | |
| index.js | 2 дней назад | |
| jest.config.js | 2 дней назад | |
| jest.setup.js | 2 дней назад | |
| metro.config.js | 2 дней назад | |
| package.json | 2 дней назад | |
| project.config.json | 2 дней назад | |
| project.tt.json | 2 дней назад | |
| tsconfig.json | 2 дней назад |
-- 如功能需要添加第三方库,需要查询通过npmjs查询该库与项目版本的兼容性版本;
系统版本,详见package.json文件,当前版本使用的是 taro-rn@4.0.7-canary.3,及相关的锁定版本的其他库;
# 尽量锁定安装依赖版本号,避免安装最新版本导致项目启动问题, 如下
npm install sass@1.0.0
#避免类似安装,因为这样子安装的当前依赖的最新的稳定的版本,不一定当前适用项目需要,导致其他的依赖包循环依赖进行跟新导致项目启动问题
#一定要查阅文档,避免导致项目循环依赖包版本与包内部的依赖版本不一致导致项目启动问题
# yarn add sass
安装新的依赖包后,重新清空缓存,查看是否导致项目启动问题
# 安装新的依赖包
npm install 包名
# 安装新的依赖包后,重新清空缓存,查看是否导致项目启动问题
npx react-native start --reset-cache
@tarojs/cli@^3.2.0| Playground Version | Taro version | React Native version | branch | | - | - | - | - | | 1.1.2 | >= 3.2.0, < 3.3.10 | 0.64 | releases/rn-0.64+taro-3.3.9 | | 1.2.0 ~ 1.3.9 | >= 3.3.10, < 3.4.2 | 0.66 | releases/rn-0.66+taro-3.4.2 | | 1.4.0 ~ 1.4.8 | >= 3.4.2, < 3.5.0 | 0.67 | releases/rn-0.67+taro-3.4.10 | | 1.6.0 ~ 1.6.5 | >= 3.5.0, < 3.5.6 | 0.68 | releases/rn-0.68+taro-3.5.5 | | 1.7.0 ~ 1.7.4 | >=3.5.6, < 3.6.0 | 0.69 | releases/rn-0.69+taro-3.5.11 | | 1.8.0 ~ 1.8.2 | >=3.5.6, < 4.0.0 | 0.70 | releases/rn-0.70+taro-3.6.18 | | 1.11.0 ~ | >=4.0.8 | 0.73 | main |
install peerDependencies of
@tarojs/taro-rn@tarojs/components-rnand@tarojs/router-rn, it will also runpost-install. please modify and runupgradePeerdepsscript when you change taro version.run this script after the project is initialized.
yarn upgradePeerdeps
run this script when you add new react native library or update react native library version.
see pod-install for more information.
yarn podInstall
yarn ios
yarn android
yarn start
yarn start --reset-cache
yarn build:rn --platform ios
yarn build:rn --platform android
see publishing-to-app-store for details.
see signed-apk-android for details.
use github actions to build your apps. this template include basic github action config.
see .github/workflows for details.
we assemble debug and release product for both android and ios when you push or pull request on master branch by default. design your own pipeline by modify .github/workflows files.
see events-that-trigger-workflows
Modify the following configuration items for package and publish your app.
.github/workflows/assemble_ios_debug.yml .github/workflows/assemble_ios_release.yml
env:
APP_ID: com.taro.demo # Application Product Bundle Identifier
APP_NAME: Taro Demo # The Display Name of your app
VERSION_NUMBER: 1.0.0 # Application version number
BUILD_NUMBER: 1.0.0.0 # Application build number, used by release only.
TEAM_ID: XXXXXXXXXX # Team ID, is used when upgrading project
PROVISIONING_PROFILE_SPECIFIER: Product_profile # Provisioning profile name to use for code signing
CODE_SIGN_IDENTITY: iPhone Distribution # Code signing identity type (iPhone Developer, iPhone Distribution)
SIGNING_CERTIFICATE_P12_DATA: ${{secrets.RELEASE_SIGNING_CERTIFICATE_P12_DATA}}
SIGNING_CERTIFICATE_PASSWORD: ${{secrets.RELEASE_SIGNING_CERTIFICATE_PASSWORD}}
PROVISIONING_PROFILE_DATA: ${{secrets.RELEASE_PROVISIONING_PROFILE_DATA}}
APP_STORE_CONNECT_USERNAME: ${{secrets.APP_STORE_CONNECT_USERNAME}} # This secret should be set to the Apple ID of your developer account, used by release only.
APP_STORE_CONNECT_PASSWORD: ${{secrets.APP_STORE_CONNECT_PASSWORD}} # used by release only.
values like ${{secrets.xxxxx}} are manually generated and store in your github encrypted secrets.
cat Certificates.p12 | base64 | pbcopy
encryption password of your Personal Information Exchange (.p12)
cat profile.mobileprovision | base64 | pbcopy
This secret should be set to an application-specific password for your Apple ID account. Follow these instructions to create an application-specific password.
Modify the following configuration items for package and publish your app.
.github/workflows/assemble_android_debug.yml .github/workflows/assemble_android_release.yml
env:
APP_ID: com.taro.demo # Application Product Bundle Identifier
APP_NAME: Taro Demo # The Display Name of your app
VERSION_NAME: 1.0.0 # version name
VERSION_CODE: 10 # version code
KEYSTORE_FILE: debug.keystore # key store file
KEYSTORE_PASSWORD: android # key store password
KEYSTORE_KEY_ALIAS: androiddebugkey # key store key alias
KEYSTORE_KEY_PASSWORD: android # key store key password
For the security of your app, please regenerate the .keystore file and store the password in your github encrypted secrets.
yarn build:rn --platform android --reset-cache
cd android
# 清理缓存
./gradlew clean
# 构建Release版本
./gradlew assembleRelease
# 构建debug包
./gradlew assembleDebug
This project supports web and mini program, but it has not been fully tested.
yarn dev:h5
see peaceiris/actions-gh-pages for more details.
yarn dev:weapp
We use @tarojs/plugin-mini-ci to deploy mini programs. Modify the following configuration items for package and publish your wechat mini program.
env:
WEAPP_ID: ${{ secrets.WEAPP_ID }} # wechat mini program id
WEAPP_KEY: ${{ secrets.WEAPP_KEY }} # wechat mini program key
values like ${{secrets.xxxxx}} are manually generated and store in your github encrypted secrets.
cat private.$WEAPP_ID.key | base64 | pbcopy
The source code is customized for the Taro playground application and is for reference only. If you want to use it directly, please make the following changes.
taroDemo, which used in AppRegistry.registerComponent(appName, () => App);.taro://${ip}:${port} or shaking the phone and change bundle Location.