@hlw-uni/mp-cli 1.0.20 → 1.0.21
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
CHANGED
|
@@ -10,28 +10,30 @@ npm install -g @hlw-uni/mp-cli
|
|
|
10
10
|
|
|
11
11
|
# 或直接使用 npx
|
|
12
12
|
npx @hlw-uni/mp-cli create my-project
|
|
13
|
+
|
|
14
|
+
npx -y @hlw-uni/mp-cli@latest create my-project
|
|
13
15
|
```
|
|
14
16
|
|
|
15
17
|
## 命令
|
|
16
18
|
|
|
17
|
-
| 命令
|
|
18
|
-
|
|
19
|
-
| `hlw-uni-mp create [name]`
|
|
20
|
-
| `hlw-uni-mp create [name] --ci`
|
|
21
|
-
| `hlw-uni-mp add page <name>`
|
|
22
|
-
| `hlw-uni-mp add component <name>` | 添加新组件
|
|
23
|
-
| `hlw-uni-mp list`
|
|
24
|
-
| `hlw-uni-mp --help`
|
|
19
|
+
| 命令 | 说明 |
|
|
20
|
+
| --------------------------------- | ----------------------------------- |
|
|
21
|
+
| `hlw-uni-mp create [name]` | 创建新项目(交互式引导) |
|
|
22
|
+
| `hlw-uni-mp create [name] --ci` | 非交互模式创建,使用默认选项 |
|
|
23
|
+
| `hlw-uni-mp add page <name>` | 添加新页面(自动注册到 pages.json) |
|
|
24
|
+
| `hlw-uni-mp add component <name>` | 添加新组件 |
|
|
25
|
+
| `hlw-uni-mp list` | 列出所有可用平台和模板 |
|
|
26
|
+
| `hlw-uni-mp --help` | 显示帮助信息 |
|
|
25
27
|
|
|
26
28
|
### create 命令选项
|
|
27
29
|
|
|
28
|
-
| 选项
|
|
29
|
-
|
|
30
|
-
| `-p, --platform <platform>`
|
|
31
|
-
| `-t, --template <template>`
|
|
32
|
-
| `-d, --description <description>` | 项目描述
|
|
33
|
-
| `-a, --author <author>`
|
|
34
|
-
| `--ci`
|
|
30
|
+
| 选项 | 说明 |
|
|
31
|
+
| --------------------------------- | ------------------------------------- |
|
|
32
|
+
| `-p, --platform <platform>` | 指定平台 (`mp-weixin` / `mp-toutiao`) |
|
|
33
|
+
| `-t, --template <template>` | 指定模板 ID |
|
|
34
|
+
| `-d, --description <description>` | 项目描述 |
|
|
35
|
+
| `-a, --author <author>` | 作者名称 |
|
|
36
|
+
| `--ci` | 非交互模式,自动使用默认选项 |
|
|
35
37
|
|
|
36
38
|
## 使用示例
|
|
37
39
|
|
|
@@ -60,9 +62,9 @@ hlw-uni-mp list
|
|
|
60
62
|
|
|
61
63
|
## 支持的平台
|
|
62
64
|
|
|
63
|
-
| 平台
|
|
64
|
-
|
|
65
|
-
| 微信小程序 | `mp-weixin`
|
|
65
|
+
| 平台 | ID | 描述 |
|
|
66
|
+
| ---------- | ------------ | -------------- |
|
|
67
|
+
| 微信小程序 | `mp-weixin` | 微信小程序模板 |
|
|
66
68
|
| 抖音小程序 | `mp-toutiao` | 抖音小程序模板 |
|
|
67
69
|
|
|
68
70
|
## 模板
|
|
@@ -151,12 +153,12 @@ npm run build:mp-toutiao
|
|
|
151
153
|
|
|
152
154
|
```json
|
|
153
155
|
{
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
156
|
+
"dependencies": {
|
|
157
|
+
"chalk": "^4.1.2",
|
|
158
|
+
"commander": "^11.1.0",
|
|
159
|
+
"fs-extra": "^11.2.0",
|
|
160
|
+
"inquirer": "^8.2.7",
|
|
161
|
+
"ora": "^5.4.1"
|
|
162
|
+
}
|
|
161
163
|
}
|
|
162
164
|
```
|
package/package.json
CHANGED