@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>` | 添加新页面(自动注册到 pages.json) |
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>` | 指定平台 (`mp-weixin` / `mp-toutiao`) |
31
- | `-t, --template <template>` | 指定模板 ID |
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
- | 平台 | ID | 描述 |
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
- "dependencies": {
155
- "chalk": "^4.1.2",
156
- "commander": "^11.1.0",
157
- "fs-extra": "^11.2.0",
158
- "inquirer": "^8.2.7",
159
- "ora": "^5.4.1"
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hlw-uni/mp-cli",
3
- "version": "1.0.20",
3
+ "version": "1.0.21",
4
4
  "description": "uniapp 小程序脚手架生成器",
5
5
  "main": "bin/cli.js",
6
6
  "bin": {
@@ -20,5 +20,12 @@ export default defineConfig(async () => {
20
20
  '@': '/src',
21
21
  },
22
22
  },
23
+ css: {
24
+ preprocessorOptions: {
25
+ scss: {
26
+ api: 'modern-compiler',
27
+ },
28
+ },
29
+ },
23
30
  };
24
31
  });
@@ -20,5 +20,12 @@ export default defineConfig(async () => {
20
20
  '@': '/src',
21
21
  },
22
22
  },
23
+ css: {
24
+ preprocessorOptions: {
25
+ scss: {
26
+ api: 'modern-compiler',
27
+ },
28
+ },
29
+ },
23
30
  };
24
31
  });