@wagq/wa-cli 0.6.58 → 0.6.60

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
@@ -119,13 +119,16 @@ wa da
119
119
  ### batchUpdate
120
120
 
121
121
  - **作用**:批量升级依赖包,可指定组织范围
122
- - **用法**:`wa batchUpdate`
122
+ - **用法**:`wa batchUpdate [prefix]`
123
123
  - **别名**:`wa bu`
124
124
  - **交互**:输入需要更新的包组织前缀(如 `@wagq`),会自动更新 `dependencies` 中匹配该前缀的依赖
125
+ - **直接指定**:可在命令后直接传入组织前缀,如 `wa batchUpdate @wagq`
125
126
 
126
127
  ```bash
127
128
  wa batchUpdate
129
+ wa batchUpdate @wagq
128
130
  wa bu
131
+ wa bu @wagq
129
132
  ```
130
133
 
131
134
  ### web2exe
package/config/command.js CHANGED
@@ -22,11 +22,11 @@ const command = [
22
22
  },
23
23
  },
24
24
  {
25
- name: "batchUpdate",
25
+ name: "batchUpdate [prefix]",
26
26
  alias: "bu",
27
27
  description: "批量升级依赖包,可以指定组织,只更新组织下的依赖",
28
- action: () => {
29
- batchUpdate();
28
+ action: (prefix) => {
29
+ batchUpdate(prefix);
30
30
  },
31
31
  },
32
32
  {
@@ -2,7 +2,13 @@ const { writePackageTxt } = require("../../utils/packages");
2
2
  const getupdateContent = require("./getUpdateLibs");
3
3
  const Prompt = require("inquirer");
4
4
 
5
- const batchUpdate = async () => {
5
+ const batchUpdate = async (prefix) => {
6
+ if (prefix) {
7
+ const packageContent = await getupdateContent(prefix);
8
+ writePackageTxt(packageContent);
9
+ return;
10
+ }
11
+
6
12
  const quetionList = [
7
13
  {
8
14
  type: "input",
@@ -12,8 +18,8 @@ const batchUpdate = async () => {
12
18
  },
13
19
  ];
14
20
 
15
- const { prefix } = await Prompt.default.prompt(quetionList);
16
- const packageContent = await getupdateContent(prefix);
21
+ const { prefix: selectedPrefix } = await Prompt.default.prompt(quetionList);
22
+ const packageContent = await getupdateContent(selectedPrefix);
17
23
  writePackageTxt(packageContent);
18
24
  };
19
25
 
@@ -59,7 +59,7 @@ const generateIcon2Tsx = async (svgPath, output) => {
59
59
  const reactContent = `
60
60
  import IconBase from '../components/IconBase'
61
61
  import icon from '../svgConfig/${fileName}'
62
- import { IconProps } from '@/types'
62
+ import { IconProps } from '../types'
63
63
 
64
64
  const ${fileName} = (props: IconProps) => {
65
65
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wagq/wa-cli",
3
- "version": "0.6.58",
3
+ "version": "0.6.60",
4
4
  "description": "wa的脚手架",
5
5
  "main": "index.js",
6
6
  "scripts": {