• Home
Name Date Size #Lines LOC

..--

compiler/12-May-2024-72,19363,576

.gitignoreD12-May-2024266 1312

BUILD.gnD12-May-202410.7 KiB353315

LICENSED12-May-20249.9 KiB178150

OAT.xmlD12-May-20241.5 KiB3314

README.mdD12-May-20241.9 KiB8366

README_zh.mdD12-May-20241.6 KiB8466

build_ets_loader_library.pyD12-May-20244.7 KiB11988

bundle.jsonD12-May-20241.3 KiB4039

generateSysResource.pyD12-May-20242.8 KiB8256

install_arkguard_tsc.pyD12-May-20242.3 KiB6339

README.md

1# developtools_ace_ets2bundle
2
3#### Description
4Provide declarative paradigm syntax compilation conversion, syntax verification, rich and friendly syntax error prompting capabilities.
5
6#### Software Architecture
7
8* compiler/src: source code
9* test: unit test file
10* .eslintrc: eslint configure
11* babel.config.js: babel configure
12* main.js: source code
13* package.json: define what libraries will be installed into node_modules when you run `npm install`
14* tsconfig.json: the compiler options required to compile the project
15* webpack.config.js: webpack configuration information
16
17#### Prerequisites
18
19```
20> npm -v
21  6.14.8
22> node -v
23  v12.18.3
24```
25Please install the **latest stable version**.
26
27#### Installing
28
29Enter the root directory of the compiler:
30```
31npm config set registry http://registry.npm.taobao.org
32npm config set strict-ssl false
33npm cache clean -f
34npm install
35```
36
37#### Quick Start
38
39Enter the root directory of the compiler:
40```
41npm run build
42npm run compile
43```
44The `sample` project will be compiled. The output is in the `sample/build` directory.
45
46#### Creating a Project
47
48Enter the root directory of the compiler:
49```
50npm run create [projectName]
51```
52
53**Note**: If `projectName` is not specified, the `HelloAce` project will be compiled.
54For example, use the following line to create a project named `foo`:
55```
56$ npm run create foo
57```
58The directory structure of project `foo`:
59- foo
60  - pages
61    - index.ets
62  - app.ets
63  - manifest.json
64
65#### Creating a Page
66
67For example, create a file `bar.ets` in the `pages` directory. And then add the following lines to `"pages"` field in `manifest.json`:
68```
69  "pages": [
70    "pages/index",
71    "pages/bar"
72  ]
73```
74
75#### Compiling a Project
76
77Enter the root directory of the compiler:
78```
79$ npm run build
80$ npm run compile [projectName]
81```
82**Note**: If `projectName` is not specified, the `sample` project will be compiled. In the project root directory, the compilation result is in the `build` directory.
83

README_zh.md

1# developtools_ace_ets2bundle
2
3#### 介绍
4
5提供声明式范式的语法编译转换,语法验证,丰富友好的语法报错提示能力。
6
7#### 软件架构
8
9* compiler/src: 编译转换工具源码
10* test: 单元测试用例
11* .eslintrc: eslint配置规则
12* babel.config.js: babel配置信息
13* main.js: 编译转换工具源码
14* package.json: 安装依赖软件版本信息
15* tsconfig.json: 编译工程配置信息
16* webpack.config.js: 打包工具脚本配置信息
17
18#### 环境准备
19
20```
21> npm -v
22  6.14.8
23> node -v
24  v12.18.3
25```
26请安装最新稳定的node版本。
27
28#### 安装
29
30进入到compiler目录
31```
32npm config set registry http://registry.npm.taobao.org
33npm config set strict-ssl false
34npm cache clean -f
35npm install
36```
37
38#### 快速开始
39
40进入到compiler目录
41```
42npm run build
43npm run compile
44```
45上述命令编译了compiler目录下的`sample`工程,编译结果在`sample\build`目录。
46
47#### 创建一个新工程
48
49进入到compiler目录
50```
51npm run create [projectName]
52```
53
54**Note**: 如果`projectName`未指定,`HelloAce`为默认的工程名。
55例如创建一个`foo`工程:
56```
57$ npm run create foo
58```
59工程`foo`的目录结构:
60- foo
61  - pages
62    - index.ets
63  - app.ets
64  - manifest.json
65
66#### 创建一个新的页面
67
68例如在`pages`目录创建一个`bar.ets`页面,需要在manifest.json文件的`pages`新增一行,如下所示:
69```
70  "pages": [
71    "pages/index",
72    "pages/bar"
73  ]
74```
75
76#### 编译工程
77
78进入到compiler目录
79```
80$ npm run build
81$ npm run compile [projectName]
82```
83**Note**: 如果`projectName`未指定,默认编译`sample`工程,编译结果在`sample\build`目录。
84