revise the `using-the-toolchain` doc

Signed-off-by: hufeng <hufeng20@huawei.com>
Change-Id: Ie73e03f6e56a360338a2f955ac74219d562ab598
This commit is contained in:
hufeng 2021-09-23 11:48:32 +08:00
parent c7a7c50a6b
commit 87d5d1038c
2 changed files with 22 additions and 6 deletions

View File

@ -4,12 +4,20 @@
## JS字节码编译工具概述
将JS文件转换为方舟字节码。
使用前端工具将JS文件转换为方舟字节码文件。方舟前端工具在linux平台上可通过全量编译或指定编译前端工具链获取
命令行格式
构建编译
```
node --expose-gc index.js [选项] file.js
$ ./build.sh --product-name Hi3516DV300 --build-target ark_ts2abc
```
使用前端工具:
```
$ cd out/ohos-arm-release/clang_x64/ark/ark/build
$ npm install
$ node --expose-gc src/index.js [选项] file.js
```
<a name="table18706114344420"></a>

View File

@ -4,12 +4,20 @@ The ARK front-end tools use the command line interaction mode and convert JS cod
## JS Bytecode Compiler
Converts a JS file into ARK bytecodes.
Front-end tools, converting JS source code into ark bytecode, can be built by specifing the `--build-target` with `ark_ts2abc`.
Command:
Build tools:
```
node --expose-gc index.js [option] file.js
$ ./build.sh --product-name Hi3516DV300 --build-target ark_ts2abc
```
Use tools:
```
$ cd out/ohos-arm-release/clang_x64/ark/ark/build
$ npm install
$ node --expose-gc src/index.js [option] file.js
```
<a name="table18706114344420"></a>