mirror of
https://gitee.com/openharmony/napi_generator
synced 2025-02-17 07:37:46 +00:00
modify md
Signed-off-by: zhaoxudong <bayanxing@kaihongdigi.com>
This commit is contained in:
parent
14b2cc3a16
commit
5a96739881
@ -37,82 +37,37 @@
|
||||
|
||||
1. 在napi_generator/src这个目录下执行命令:
|
||||
|
||||
npm i typescript
|
||||
|
||||
joey@joey-virtual-machine:~/code/napi_tool_myself/napi_generator/src$ npm i typescript
|
||||
npm WARN gnapi@0.0.1 No repository field.
|
||||
npm WARN gnapi@0.0.1 No license field.
|
||||
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents):
|
||||
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
|
||||
|
||||
+ typescript@4.5.5
|
||||
added 267 packages from 238 contributors in 33.185s
|
||||
|
||||
39 packages are looking for funding
|
||||
run `npm fund` for details
|
||||
|
||||
joey@joey-virtual-machine:~/code/napi_tool_myself/napi_generator/src$
|
||||
npm i typescript
|
||||
|
||||
2. 在napi_generator/src这个目录下执行命令:
|
||||
|
||||
npm i vsce
|
||||
|
||||
joey@joey-virtual-machine:~/code/napi_tool_myself/napi_generator/src$ npm i vsce
|
||||
|
||||
> keytar@7.9.0 install /home/joey/code/napi_tool_myself/napi_generator/src/node_modules/keytar
|
||||
> prebuild-install || npm run build
|
||||
|
||||
npm WARN gnapi@0.0.1 No repository field.
|
||||
npm WARN gnapi@0.0.1 No license field.
|
||||
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents):
|
||||
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
|
||||
|
||||
+ vsce@2.6.7
|
||||
added 103 packages from 191 contributors in 39.489s
|
||||
|
||||
64 packages are looking for funding
|
||||
run `npm fund` for details
|
||||
|
||||
joey@joey-virtual-machine:~/code/napi_tool_myself/napi_generator/src$
|
||||
npm i vsce
|
||||
|
||||
3. 在napi_generator/src这个目录下执行命令:
|
||||
|
||||
npx vsce package
|
||||
每个选项都选择y,然后回车,最终会在当前目录下打包生成一个插件gnapi-0.0.1.vsix。
|
||||
npx vsce package
|
||||
|
||||
joey@joey-virtual-machine:~/code/napi_tool_myself/napi_generator/src$ npx vsce package
|
||||
WARNING A 'repository' field is missing from the 'package.json' manifest file.
|
||||
Do you want to continue? [y/N] y
|
||||
WARNING Using '*' activation is usually a bad idea as it impacts performance.
|
||||
More info: https://code.visualstudio.com/api/references/activation-events#Start-up
|
||||
Do you want to continue? [y/N] y
|
||||
WARNING LICENSE.md, LICENSE.txt or LICENSE not found
|
||||
Do you want to continue? [y/N] y
|
||||
This extension consists of 2189 files, out of which 1184 are JavaScript files. For performance reasons, you should bundle your extension: https://aka.ms/vscode-bundle-extension . You should also exclude unnecessary files by adding them to your .vscodeignore: https://aka.ms/vscode-vscodeignore
|
||||
DONE Packaged: /home/joey/code/napi_tool_myself/napi_generator/src/gnapi-0.0.1.vsix (2189 files, 13.61MB)
|
||||
joey@joey-virtual-machine:~/code/napi_tool_myself/napi_generator/src$
|
||||
4. 每个选项都选择y,然后回车,最终会在当前目录下打包生成一个插件gnapi-0.0.1.vsix。结果如下:
|
||||
|
||||
![](figures/linux_package_vsix.png)
|
||||
|
||||
#### Windows
|
||||
|
||||
1. 在napi_generator/src这个目录下执行命令:
|
||||
|
||||
npm i typescript
|
||||
|
||||
D:\napi_tool_myself\napi_generator\src>npm i typescript npm WARN gnapi@0.0.1 No repository field. npm WARN gnapi@0.0.1 No license field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) + typescript@4.5.5 updated 1 package and audited 373 packages in 2.729s 64 packages are looking for funding run `npm fund` for details found 1 moderate severity vulnerability run `npm audit fix` to fix them, or `npm audit` for details D:\napi_tool_myself\napi_generator\src>
|
||||
npm i typescript
|
||||
|
||||
2. 在napi_generator/src这个目录下执行命令:
|
||||
|
||||
npm i vsce
|
||||
|
||||
D:\napi_tool_myself\napi_generator\src>npm i vsce > keytar@7.9.0 install D:\napi_tool_myself\napi_generator\src\node_modules\keytar > prebuild-install || npm run build npm WARN gnapi@0.0.1 No repository field. npm WARN gnapi@0.0.1 No license field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) + vsce@2.6.7 added 103 packages from 191 contributors and audited 373 packages in 21.128s 64 packages are looking for funding run `npm fund` for details found 1 moderate severity vulnerability run `npm audit fix` to fix them, or `npm audit` for details D:\napi_tool_myself\napi_generator\src>
|
||||
npm i vsce
|
||||
|
||||
3. 在napi_generator/src这个目录下执行命令:
|
||||
|
||||
npx vsce package
|
||||
npx vsce package
|
||||
|
||||
每个选项都选择y,然后回车,最终会在当前目录下打包生成一个插件gnapi-0.0.1.vsix。
|
||||
4. 每个选项都选择y,然后回车,最终会在当前目录下打包生成一个插件gnapi-0.0.1.vsix。结果如下:
|
||||
|
||||
D:\napi_tool_myself\napi_generator\src>npx vsce package WARNING A 'repository' field is missing from the 'package.json' manifest file. Do you want to continue? [y/N] y WARNING Using '*' activation is usually a bad idea as it impacts performance. More info: https://code.visualstudio.com/api/references/activation-events#Start-up Do you want to continue? [y/N] y WARNING LICENSE.md, LICENSE.txt or LICENSE not found Do you want to continue? [y/N] y This extension consists of 2189 files, out of which 1184 are JavaScript files. For performance reasons, you should bundle your extension: https://aka.ms/vscode-bundle-extension . You should also exclude unnecessary files by adding them to your .vscodeignore: https://aka.ms/vscode-vscodeignore DONE Packaged: D:\napi_tool_myself\napi_generator\src\gnapi-0.0.1.vsix (2189 files, 13.79MB) D:\napi_tool_myself\napi_generator\src>
|
||||
![](figures/win_package_vsix.png)
|
||||
|
||||
### IntelliJ插件开发说明
|
||||
|
||||
|
@ -2,7 +2,8 @@
|
||||
|
||||
## 场景说明
|
||||
|
||||
OpenHarmony应用层需要通过动态库调用NAPI接口,本文介绍如何将工具生成的源码利用OpenHarmony编译系统生成动态库供应用层调用。
|
||||
为了实现工具生成的接口被其他子系统或者应用调用,需将生成的代码编译集成到OpenHarmony系统中,使其生成动态库,供OpenHarmony应用层调用。
|
||||
本文介绍如何将工具生成的源码利用OpenHarmony编译系统生成动态库供应用层调用。
|
||||
|
||||
## 建立模块位置
|
||||
|
||||
|
BIN
figures/linux_package_vsix.png
Normal file
BIN
figures/linux_package_vsix.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 75 KiB |
BIN
figures/win_package_vsix.png
Normal file
BIN
figures/win_package_vsix.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 79 KiB |
@ -1,6 +1,7 @@
|
||||
# NAPI框架生成工具story测试
|
||||
|
||||
## 概述
|
||||
为了将一个大的特性划分成小颗粒度的功能块,根据功能点确定输入和输出以便获得快速反馈。需要编写story测试对功能进行用例验证。
|
||||
本文主要介绍NAPI框架代码生成工具story功能测试使用指导。
|
||||
|
||||
## 目录
|
||||
@ -72,7 +73,7 @@ napi_generator/src目录下安装以下依赖:
|
||||
|
||||
## 查看结果
|
||||
|
||||
红色:用例执行失败。
|
||||
红色:用例执行失败,代表修改的代码有bug或者用例的输出发生变化,需要修改用例。
|
||||
|
||||
绿色:用例执行成功。
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
# NAPI框架生成工具单元测试
|
||||
|
||||
## 概述
|
||||
为了验证代码与设计相符合,跟踪需求和设计的实现,发现设计和需求中存在的错误。需要用单元测试检验被测代码的一个很小的、明确的功能是否正确。
|
||||
本文主要介绍NAPI框架代码生成工具unit单元测试使用指导。
|
||||
|
||||
## 目录
|
||||
@ -63,7 +64,7 @@ napi_generator/src目录下安装以下依赖:
|
||||
|
||||
## 查看结果
|
||||
|
||||
红色:用例执行失败。
|
||||
红色:用例执行失败,代表修改的代码有bug或者用例的输出发生变化,需要修改用例。
|
||||
|
||||
绿色:用例执行成功。
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user