zero-ai 0.3.26 → 0.3.27

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
@@ -1,25 +1,28 @@
1
1
  # Zero工具箱
2
2
 
3
- Zero工具箱为一个工具类型的项目,主要为后端项目和前端项目打造的辅助开发人员进行快速开发的命令行工具,该框架的前端项目和后端项目的地址如下:
3
+ Zero工具箱为一个工具类型的项目,主要为后端项目和前端项目打造的辅助开发人员进行快速开发的命令行工具,该工具可以帮助开发人员执行`Zero/Zero Ui`
4
+ 的智能化开发,版本会持续发布到npm社区。
4
5
 
5
- * 前端:[http://www.vertxui.cn](http://www.vertxui.cn)
6
- * 后端:[http://www.vertxup.cn](http://www.vertxup.cn)
7
- * 详细文档:[Zero Ai文档](http://www.vertxai.cn/document/doc-web/index.html)
6
+ * 详细文档:[Zero Ai命令](http://www.vertxai.cn/document/doc-web/index.html)
8
7
 
9
- 该工具可以帮助开发人员执行`Zero/Zero Ui`的智能化开发,工具最新版本为`0.3.2`,目前已发布到npm社区。
8
+ ## 0. 引导
9
+
10
+ - (后端)Zero Ecotope:<https://www.zerows.io>
11
+ - (前端)Zero UI:<https://www.vertxui.cn>
12
+ - (工具)Zero AI:<https://www.vertxai.cn>
13
+ - (标准)Zero Schema:<https://www.vertx-cloud.cn>
10
14
 
11
15
  ## 1. 安装流程
12
16
 
17
+ > Windows必须启用 WSL 才可用
18
+
13
19
  使用以下命令安装该工具
14
20
 
15
21
  ```
16
- # 旧版
17
- npm install -g vertx-ai
18
- # 新版(从 0.3.25)
19
22
  npm install -g zero-ai
20
23
  ```
21
24
 
22
- 等你看到下边的输出信息后,证明安装过程已完成,目前最新版本:**0.3.0**。
25
+ 等你看到下边的输出信息后,证明安装过程已完成:
23
26
 
24
27
  ```
25
28
  /usr/local/bin/ai -> /usr/local/lib/node_modules/vertx-ai/src/ai.js
@@ -29,27 +32,25 @@ npm install -g zero-ai
29
32
  added 77 packages from 119 contributors in 8.417s
30
33
  ```
31
34
 
32
- ## 2. 基本说明
35
+ ## 2. 常用命令说明
33
36
 
34
- > 下边是工具列表,主要分为两种:独立工具/Zero专用工具
37
+ ### 2.1. 三大命令
35
38
 
36
- * 基础自动化工具:可直接调用`ai xxx`方式执行的工具。
37
- * 后端工具:调用`aj xxx`,部分命令需要设置对应环境变量。
38
- * 前端工具:调用`art xxx`。
39
+ - ai:标准命令
40
+ - aj:后端专用命令(For Java)
41
+ - art:前端开发命令(For React)
39
42
 
40
- ### 2.1. 环境变量表
43
+ ### 2.2. 工程初始化
41
44
 
42
- | 环境变量名 | 例子 | 含义 |
43
- |-------|:----------------------------------|:--------------------------------------|
44
- | ZT | `export ZT=generated/tool` | 「前端」接下来的所有ZT命令都是在generated/tool模块中执行。 |
45
- | ZF | `export ZF=ox-engine/ox-business` | 「后端」接下来所有的ZF命令都在对应目录中执行。 |
45
+ ```shell
46
+ # 前端工程初始化
47
+ ai init -name <name>
48
+ # 前端工程更新
49
+ ai sync
46
50
 
47
- ### 2.2. 注意点
48
-
49
- * ZT环境变量设置后,必须存在目录`src/xxx`,如`ZT=generated/tool`,那么必须存在`src/generate/tool`目录,基础信息对应到
50
- * `src/components/generated/tool` - Zero中的组件开发目录
51
- * `src/cab/cn/components/generated/tool` - Zero中的资源文件目录
52
- * ZF环境变量设置后,设置目录下必须包含`pom.xml`文件(后端项目基础结构,Maven检测)
51
+ # 后端工程初始化
52
+ aj init
53
+ ```
53
54
 
54
55
 
55
56
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zero-ai",
3
- "version": "0.3.26",
3
+ "version": "0.3.27",
4
4
  "description": "Zero Ecotope AI",
5
5
  "main": "src/ai.js",
6
6
  "bin": {
@@ -5,7 +5,9 @@ module.exports = () => {
5
5
  [
6
6
  ['-n', '--name']
7
7
  ],
8
- []
8
+ [
9
+ ['-n', '--name']
10
+ ]
9
11
  );
10
12
  // 第一步:环境检查
11
13
  if (Ec.isExist(".git")) {
@@ -15,7 +17,7 @@ module.exports = () => {
15
17
  // 第二步:检查 vertx-ui
16
18
  const target = actual.name;
17
19
  Ec.info(`工程构建目录:${target}`);
18
- const cmd = `git clone https://gitee.com/silentbalanceyh/vertx-ui.git ${target}`;
20
+ const cmd = `git clone https://gitee.com/silentbalanceyh/scaffold-ui.git ${target}`;
19
21
  child.execSync(cmd, {stdio: 'inherit'});
20
22
  // 删除目标目录中的 .git 文件夹
21
23
  Ec.info(`执行工程初始化:${target}`);
@@ -17,16 +17,16 @@ module.exports = () => {
17
17
  // 2. 创建 .zero 目录
18
18
  const cmdDir = `mkdir -p ${path}`;
19
19
  child.execSync(cmdDir, {stdio: 'inherit'});
20
+ const pathSource = `${path}/scaffold-ui`
20
21
  // 3. 删除 .zero/vertx-ui 目录
21
- if (Ec.isExist(`${path}/vertx-ui`)) {
22
- Ec.info(`发现存在旧代码,正在删除:${path}/vertx-ui`);
23
- const cmdDel = `rm -rf ${path}/vertx-ui`;
22
+ if (Ec.isExist(pathSource)) {
23
+ Ec.info(`发现存在旧代码,正在删除:${pathSource}`);
24
+ const cmdDel = `rm -rf ${pathSource}`;
24
25
  child.execSync(cmdDel, {stdio: 'inherit'});
25
26
  }
26
27
  // 4. 重新拉取代码
27
- const pathSource = `${path}/vertx-ui`
28
28
  Ec.info(`拉取最新代码:${pathSource}`);
29
- const cmdGit = `git clone https://gitee.com/silentbalanceyh/vertx-ui.git ${pathSource}`;
29
+ const cmdGit = `git clone https://gitee.com/silentbalanceyh/scaffold-ui.git ${pathSource}`;
30
30
  child.execSync(cmdGit, {stdio: 'inherit'});
31
31
  const cmdRm = `rm -rf ${pathSource}/.git`;
32
32
  child.execSync(cmdRm, {stdio: 'inherit'});