Skip to content

Commit

Permalink
Merge pull request #80 from wtto00/0.0.2
Browse files Browse the repository at this point in the history
New version: 0.0.2-alpha
  • Loading branch information
wtto00 authored Nov 12, 2024
2 parents 17b0e19 + 00d29ea commit 72b4f48
Show file tree
Hide file tree
Showing 22 changed files with 732 additions and 81 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,13 @@ jobs:
- name: Install Dependencies
run: pnpm i

- name: Prepare
run: |
mkdir ~/.ssh
echo "${{secrets.SSH_PRIVATE_KEY}}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
echo "Host *" > ~/.ssh/config
echo " StrictHostKeyChecking accept-new" >> ~/.ssh/config
- name: Test
run: pnpm test
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,20 @@

## [Unreleased]

## [0.0.2-alpha] - 2024-11-12

### Fixed

- 修复无法使用 `vite` 的模式 `--mode` 参数

### Changed

- `transform` 添加 `--force` 参数

## [0.0.1-alpha] - 2024-11-11

First version.

[unreleased]: https://github.com/wtto00/biome-config/compare/v0.0.1-alpha...HEAD
[unreleased]: https://github.com/wtto00/biome-config/compare/v0.0.2-alpha...HEAD
[0.0.1-alpha]: https://github.com/wtto00/biome-config/releases/tag/v0.0.2-alpha
[0.0.1-alpha]: https://github.com/wtto00/biome-config/releases/tag/v0.0.1-alpha
8 changes: 7 additions & 1 deletion docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ export default defineConfig({
{ text: '创建项目', link: 'create' },
{ text: '检查环境', link: 'requirement' },
{ text: '转换项目', link: 'transform' },
{ text: '平台管理', link: 'platform' },
{ text: '启动运行', link: 'run' },
{ text: '构建打包', link: 'build' },
],
base: '/guide/',
},
Expand All @@ -58,7 +61,10 @@ export default defineConfig({
'/adapter/': [
{
text: '适配',
items: [{ text: 'uniCloud', link: 'unicloud' }],
items: [
{ text: 'uniCloud', link: 'unicloud' },
{ text: 'Android', link: 'android' },
],
base: '/adapter/',
},
],
Expand Down
106 changes: 106 additions & 0 deletions docs/adapter/android.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# Android 适配指南

## 开发环境要求

参见 [Requiement Android App](../guide/requirement.html#android-app)

## 运行打包要求

- 需要在 `manifest.json` 中配置 `app-plus.distribute.android.dcloud_appkey`[appkey 申请](https://nativesupport.dcloud.net.cn/AppDocs/usesdk/appkey.html)
- 需要配置 [签名](../config/#keystore-path)

## uni 一键登录

使用 `uni一键登录` 模块的,需要在 `manifest.json` 中配置 `app-plus.distribute.sdkConfigs.oauth.univerify.appid`

## Facebook 登录

使用 `Facebook登录` 模块的,如果要上架 Google Play,需要在 `manifest.json` 中配置 `app-plus.distribute.sdkConfigs.oauth.facebook.permission_ad_remove``true`

## 友盟统计

使用 `友盟统计` 模块的,如果要上架 Google Play,需要在 `manifest.json` 中配置 `app-plus.distribute.sdkConfigs.statics.umeng.google_play``true`

## 消息推送

使用 `消息推送` 模块的,有原来的在 `开发者后台->unipush->配置管理->应用管理` 中配置,需要在 `manifest.json` 中添加如下配置:

```jsonc
{
"app-plus": {
"distribute": {
"sdkConfigs": {
"push": {
"unipush": {
"appid": "",
"appkey": "",
"appsecret": "",
"hms": {
"appid": "",
"config": ""
},
"oppo": {
"appkey": "",
"appsecret": ""
},
"vivo": {
"appid": "",
"appkey": ""
},
"mi": {
"appid": "",
"appkey": ""
},
"meizu": {
"appid": "",
"appkey": ""
},
"honor": {
"appid": ""
},
"fcm": {
"serverkey": "",
"channelid": "",
"config_ios": "",
"config_android": ""
}
}
}
}
}
}
}
```

## 高德地图

如果是在 `nvue` 页面中使用的高德地图,需要在 `manifest.json` 中配置 `app-plus.distribute.sdkConfigs.maps.amap.nvue``true`

## 语音输入

使用 `语音输入` 模块的,需要在 `manifest.json` 中配置中,添加如下配置:

```json
{
"app-plus": {
"distribute": {
"sdkConfigs": {
"speech": {
"baidu": {
"__platform__": ["android", "ios"],
"appid_android": "",
"apikey_android": "",
"secretkey_android": "",
"appid_ios": "",
"apikey_ios": "",
"secretkey_ios": ""
},
"xunfei": {
"appid": ""
}
}
}
}
}
}
```
3 changes: 2 additions & 1 deletion docs/adapter/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@

相对于 `HBuilderX` 项目,使用 `uniapp-cli` 开发,需要做一些额外配置。

- [uniCloud](./unicloud)
- [uniCloud 适配指南](./unicloud)
- [Android 适配指南](./android)
8 changes: 5 additions & 3 deletions docs/adapter/unicloud.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# uniCloud
# uniCloud 适配指南

如果项目中使用了 `uniCloud`,需要按照以下方式配置,才可以正常连接 `云端云函数`。不支持连接 `本地云函数`

`uniapp-cli.config.json` 中配置 `UNI_CLOUD_PROVIDER`:

Expand Down Expand Up @@ -29,9 +31,9 @@
export UNI_CLOUD_PROVIDER='[{"accessTokenKey":"access_token_mp-****","clientSecret":"****","endpoint":"https://api.next.bspapp.com","envType":"public","provider":"aliyun","requestUrl":"https://api.next.bspapp.com/client","spaceId":"mp-****","spaceName":"****","id":"****"}]'
```

![unicloud后台信息](/unicloud.png)
打开 [uniCloud 后台](https://unicloud.dcloud.net.cn/),选择用到的服务空间,点击进入详情,如下图所示:

如上图所示:
![unicloud后台信息](/unicloud.png)

- **accessTokenKey**: 等于 `access_token_` + 图中的 `SpaceId`
- **clientSecret**: 等于图中的 `ClientSecret`
Expand Down
178 changes: 178 additions & 0 deletions docs/guide/build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
# 构建打包

使用 `uniapp build` 构建打包特定的平台。

## 帮助信息

```bash
uniapp help build
```

```
Usage: uniapp build <platform>
打包给定的平台
Arguments:
platform 要打包的平台: android,ios,h5,mp-weixin...
Options:
--no-open 不自动打开
--mode <mode> vite 环境模式
--bundle <bundle> 打包产物: aab,apk(默认)
--device <device> 运行到给定的设备上
-h, --help 帮助信息
示例:
uniapp build android --bundle aab
uniapp build ios
uniapp build mp-weixin
```

## --no-open

[运行参数--no-open](./run#no-open)

- `H5` 平台此参数无效。

## --mode

[运行参数--mode](./run#mode)

## --device

[运行参数--device](./run#device)

## H5

```bash
uniapp build h5
```

构建打包 `H5` 平台。

打包后的产物在目录 `dist/build/h5`

## Android App

```bash
uniapp build android
```

构建打包 `Android` 平台。

## iOS App

```bash
uniapp build ios
```

🚧 WIP 正在开发中...

## 鸿蒙 App

```bash
uniapp build harmony
```

🚧 WIP 正在开发中...

## 微信小程序

```bash
uniapp build mp-weixin
```

构建打包 `微信小程序` 平台。

打包后的产物在目录 `dist/build/mp-weixin`

如果配置了 [WEIXIN_DEV_TOOL](../config/#weixin-dev-tool),则会自动打开开发者工具。

## 支付宝小程序

```bash
uniapp build mp-alipay
```

🚧 WIP 正在开发中...

## 百度小程序

```bash
uniapp build mp-baidu
```

🚧 WIP 正在开发中...

## 头条小程序

```bash
uniapp build mp-toutiao
```

🚧 WIP 正在开发中...

## 飞书小程序

```bash
uniapp build mp-lark
```

🚧 WIP 正在开发中...

## QQ 小程序

```bash
uniapp build mp-qq
```

🚧 WIP 正在开发中...

## 快手小程序

```bash
uniapp build mp-kuaishou
```

🚧 WIP 正在开发中...

## 京东小程序

```bash
uniapp build mp-jd
```

🚧 WIP 正在开发中...

## 360 小程序

```bash
uniapp build mp-360
```

🚧 WIP 正在开发中...

## 小红书小程序

```bash
uniapp build mp-xhs
```

🚧 WIP 正在开发中...

## 快应用

```bash
uniapp build quickapp-union
```

🚧 WIP 正在开发中...

## 华为快应用

```bash
uniapp build quickapp-huawei
```

🚧 WIP 正在开发中...
2 changes: 1 addition & 1 deletion docs/guide/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Options:

## 项目名称

`project-name`应用名称有一些规范
`project-name`应用名称有一些规范:

- 应用名称不能为空
- 应用名称所有字母都应该使用小写,即不能使用大写或大小写混合
Expand Down
Loading

0 comments on commit 72b4f48

Please sign in to comment.