# ihaiu-code-fgui
fgui 代码生成工具



[http://blog.ihaiu.com]: http://blog.ihaiu.com

------



### 一：安装

```shell
npm i -g ihaiu-code-fgui
```

更新
```shell
npm update -g ihaiu-code-fgui
```


### 二：命令介绍

#### 1.帮助

```shell
ihaiu-code-fgui -h
```
```
Options:
  -v, --version                 output the version number
  -f, --fgui-project-path <in>  [必填] Fairygui工程根目录 (default: "../../fgui/")
  -o, --out-code-path <out>     [必填] 代码输出目录 (default: "../../client/src/FGUI")
  -l, --lang <lang>             [必填] 代码语言, 可以选[ts_layabox2mergejs, ts_layabox2merge, ts_layabox2] (default: "ts_layabox2mergejs")
  -t, --template-path <tp>      [选填] 代码模板目录

```

#### 2.生成代码命令
```shell
ihaiu-code-fgui -f FairyguiProjectPath -o OutCodePath -l ts_layabox2
```



#### 3.实例

```shell
ihaiu-code-fgui -f ../fgui -o ./src/FGUI  -l ts_layabox2
```

合并struct代码到一个js文件
```shell
ihaiu-code-fgui -f ../fgui -o ./src/FGUI  -l ts_layabox2mergejs
```



