@wagq/wa-cli 0.6.43 → 0.6.44

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
@@ -173,3 +173,59 @@ wa sk
173
173
  wa generateIcon2Tsx ./svgs
174
174
  wa gitsx ./svgs
175
175
  ```
176
+
177
+ ### changesetDoc
178
+
179
+ - **作用**:包版本管理
180
+ - **用法**:`wa changesetDoc <mode>`
181
+ - **别名**:`wa chd <mode>`
182
+ - **选项**
183
+ - `-r, --registry <registry>`:指定 npm 仓库地址(默认 `https://registry.npmjs.org/`)
184
+ - **mode 可选值**
185
+ - `dev` — 启动文档预览
186
+ - `doc` — 构建文档
187
+ - `changeset` — 收集changlog
188
+ - `ver` — 更新包
189
+ - `tBuild` — 打包包
190
+ - `enterBeta` — 进入 beta 模式
191
+ - `exitBeta` — 退出 beta 模式
192
+ - `pub` — 构建并发布正式包
193
+ - `pubBeta` — 构建并发布 beta 包
194
+
195
+ ```bash
196
+ wa changesetDoc dev
197
+ wa chd pub
198
+ ```
199
+
200
+ ### vsSetting
201
+
202
+ - **作用**:生成 `.vscode/settings.json` 配置文件(Prettier + ESLint 自动修复)
203
+ - **用法**:`wa vsSetting`
204
+ - **别名**:`wa vs`
205
+
206
+ ```bash
207
+ wa vsSetting
208
+ wa vs
209
+ ```
210
+
211
+ ### checkBranch
212
+
213
+ - **作用**:检查当前 git 分支是否为 目标分支,非目标分支则报错退出
214
+ - **用法**:`wa checkBranch [目标分支名]`
215
+ - **别名**:`wa ckb [目标分支名]`
216
+
217
+ ```bash
218
+ wa checkBranch
219
+ wa ckb
220
+ ```
221
+
222
+ ### clearLibrary
223
+
224
+ - **作用**:递归删除 `packages/*/dist`、`packages/*/node_modules` 及根目录 `node_modules`
225
+ - **用法**:`wa clearLibrary`
226
+ - **别名**:`wa cle`
227
+
228
+ ```bash
229
+ wa clearLibrary
230
+ wa cle
231
+ ```
@@ -10,7 +10,7 @@ const checkBranch = (target) => {
10
10
  log.info(`当前分支 ${branch}`);
11
11
 
12
12
  if (branch !== target) {
13
- log.error(`错误: 请在 dev 分支上执行该脚本`);
13
+ log.error(`错误: 请在 ${target} 分支上执行该脚本`);
14
14
  log.error(`当前分支: ${branch}`);
15
15
  process.exit(1);
16
16
  }
@@ -20,4 +20,4 @@ const checkBranch = (target) => {
20
20
  }
21
21
  };
22
22
 
23
- module.exports = checkBranch
23
+ module.exports = checkBranch;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wagq/wa-cli",
3
- "version": "0.6.43",
3
+ "version": "0.6.44",
4
4
  "description": "wa的脚手架",
5
5
  "main": "index.js",
6
6
  "scripts": {