modify readme
Signed-off-by: bayanxing <bayanxing@kaihongdigi.com>
@ -14,9 +14,74 @@ NAPI框架代码生成工具,根据用户指定的路径下的ts接口文件可
|
|||||||
|
|
||||||
#### 使用说明
|
#### 使用说明
|
||||||
|
|
||||||
1. xxxx
|
##### 可执行程序使用方法
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
###### Windows
|
||||||
|
|
||||||
|
1) 将要转换的.d.ts文件放到任意目录下,建议放到可执行程序cmd_gen-win.exe同级目录下,例如:
|
||||||
|
|
||||||
|
![](image/image-20220106103805904.png)
|
||||||
|
|
||||||
|
2) 右键windows开始菜单,点击运行,输入cmd,点击确定。
|
||||||
|
|
||||||
|
![](image\image-20220106104037879.png)
|
||||||
|
|
||||||
|
3) 在命令行中进入到之前可执行程序cmd_gen-win.exe所在的目录,并运行cmd_gen-win.exe,在cmd_gen-win.exe后面要对应的.d.ts文件名,例如:
|
||||||
|
|
||||||
|
![](image\image-20220106105707675.png)
|
||||||
|
|
||||||
|
4) 运行成功后会在.d.ts文件说在的目录下生成对应的文件,例如:
|
||||||
|
|
||||||
|
![](image\image-20220106110113948.png)
|
||||||
|
|
||||||
|
###### Linux
|
||||||
|
|
||||||
|
1) 将要转换的.d.ts文件放到任意目录下,建议放到可执行程序cmd_gen-linux同级目录下,例如:
|
||||||
|
|
||||||
|
![](image\image-20220106111154843.png)
|
||||||
|
|
||||||
|
2) 在终端中进入到之前可执行程序cmd_gen-linux所在的目录,并运行cmd_gen-linux,在cmd_gen-linux后面要对应的.d.ts文件名,例如:
|
||||||
|
|
||||||
|
![](image\image-20220106111753702.png)
|
||||||
|
|
||||||
|
3) 运行成功后会在.d.ts文件说在的目录下生成对应的文件,例如:
|
||||||
|
|
||||||
|
![](image\image-20220106111909233.png)
|
||||||
|
|
||||||
|
###### Mac
|
||||||
|
方法步骤参考windows、Linux的使用方法
|
||||||
|
|
||||||
|
##### 插件使用方法
|
||||||
|
###### 说明
|
||||||
|
visual studio code 版本需1.63.2及以上
|
||||||
|
|
||||||
|
###### 步骤
|
||||||
|
|
||||||
|
1) 打开vscode,在左侧边栏中选择插件安装。
|
||||||
|
|
||||||
|
![](image\image-20220106145345449.png)
|
||||||
|
|
||||||
|
2) 点击上面三个点的按钮,选择从VSIX安装选项,然后选择刚才生成的gnapi-0.0.1.vsix插件文件,再点击安装。
|
||||||
|
|
||||||
|
![](image\image-20220106145540860.png)
|
||||||
|
|
||||||
|
3) 安装完成后就会在vscode的插件管理器中能看到gnapi这个插件了。
|
||||||
|
|
||||||
|
![](image\image-20220106150434168.png)
|
||||||
|
|
||||||
|
4) 在vscode中找到需要转换的.d.ts文件,例如:
|
||||||
|
|
||||||
|
![](image\image-20220106151044789.png)
|
||||||
|
|
||||||
|
5) 鼠标在.d.ts上点击右键,选择.d.ts生成c++选项。
|
||||||
|
|
||||||
|
![](image\image-20220106151204896.png)
|
||||||
|
|
||||||
|
6) 之后就会在该目录下生成对应文件,例如:
|
||||||
|
|
||||||
|
![](image\image-20220106151510092.png)
|
||||||
|
|
||||||
|
注:以上插件使用示例为windows的,linux、mac的使用方法类似。
|
||||||
|
|
||||||
#### 参与贡献
|
#### 参与贡献
|
||||||
|
|
||||||
@ -25,4 +90,3 @@ NAPI框架代码生成工具,根据用户指定的路径下的ts接口文件可
|
|||||||
3. 提交代码
|
3. 提交代码
|
||||||
4. 新建 Pull Request
|
4. 新建 Pull Request
|
||||||
|
|
||||||
|
|
||||||
|
BIN
napi_tool/image/image-20220106103805904.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
napi_tool/image/image-20220106104037879.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
napi_tool/image/image-20220106105707675.png
Normal file
After Width: | Height: | Size: 6.0 KiB |
BIN
napi_tool/image/image-20220106110113948.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
napi_tool/image/image-20220106111154843.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
napi_tool/image/image-20220106111753702.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
napi_tool/image/image-20220106111909233.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
napi_tool/image/image-20220106145345449.png
Normal file
After Width: | Height: | Size: 44 KiB |
BIN
napi_tool/image/image-20220106145540860.png
Normal file
After Width: | Height: | Size: 54 KiB |
BIN
napi_tool/image/image-20220106150434168.png
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
napi_tool/image/image-20220106151044789.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
napi_tool/image/image-20220106151204896.png
Normal file
After Width: | Height: | Size: 37 KiB |
BIN
napi_tool/image/image-20220106151510092.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
napi_tool/image/image-20220106161108215.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
napi_tool/image/image-20220106161201896.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
napi_tool/image/image-20220106162517246.png
Normal file
After Width: | Height: | Size: 192 KiB |