|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | - | - |
| codegen/ | | 07-Sep-2024 | - | 15 | 1 |
| components/ | | 07-Sep-2024 | - | 971 | 942 |
| form_components/ | | 07-Sep-2024 | - | 244 | 237 |
| sample/ | | 07-Sep-2024 | - | 5,838 | 5,334 |
| server/ | | 07-Sep-2024 | - | 378 | 336 |
| src/ | | 07-Sep-2024 | - | 28,671 | 24,911 |
| test/ | | 07-Sep-2024 | - | 40,431 | 34,696 |
| .eslintrc | D | 07-Sep-2024 | 3.2 KiB | 116 | 110 |
| .jscpd.json | D | 07-Sep-2024 | 372 | 18 | 18 |
| .nycrc | D | 07-Sep-2024 | 622 | 24 | 23 |
| README.md | D | 07-Sep-2024 | 1.8 KiB | 82 | 62 |
| babel.config.js | D | 07-Sep-2024 | 964 | 36 | 18 |
| build_declarations_file.js | D | 07-Sep-2024 | 10.3 KiB | 253 | 223 |
| build_kitConfigs_file.js | D | 07-Sep-2024 | 4.4 KiB | 148 | 122 |
| compile_plugin.js | D | 07-Sep-2024 | 2.5 KiB | 62 | 42 |
| main.js | D | 07-Sep-2024 | 40.8 KiB | 1,106 | 1,029 |
| npm-install.js | D | 07-Sep-2024 | 1.5 KiB | 53 | 32 |
| package-lock.json | D | 07-Sep-2024 | 194.8 KiB | 4,350 | 4,349 |
| package.json | D | 07-Sep-2024 | 2.5 KiB | 59 | 58 |
| rollup.config.js | D | 07-Sep-2024 | 3.5 KiB | 108 | 85 |
| tsconfig.esm.json | D | 07-Sep-2024 | 21 KiB | 818 | 817 |
| tsconfig.json | D | 07-Sep-2024 | 22.2 KiB | 857 | 856 |
| uglify-source.js | D | 07-Sep-2024 | 1.4 KiB | 45 | 26 |
| webpack.config.js | D | 07-Sep-2024 | 14.4 KiB | 481 | 439 |
| 如何新增或修改组件指导规范.md | D | 07-Sep-2024 | 2.4 KiB | 85 | 73 |
README.md
1# compiler
2
3**The compiler tool chain for ace2.0.**
4
5## Usage
6Here are simplified instructions of how to get started. The following commands work both on **Windows** and **Linux** platforms.
7
8### 1. Install
9
10First, enter the root directory of the compiler:
11```
12$ cd compiler/
13```
14And then install the npm dependencies(You must have node&npm installed):
15```
16$ npm install
17```
18**Note**: If some errors occur, delete the generated package `node_modules`, please check the following items:
19
20First, check whether your node version is 12.x or later;
21Secondly, config npm proxy and run `npm install` again.
22```
23npm config set strict-ssl false
24npm config set registry https://registry.npm.taobao.org
25```
26
27### 2. Quick Start
28
29For a quick start
30
31In the root directory of `compiler/`:
32```
33$ npm run build
34$ npm run compile
35```
36The `sample` project will be compiled. The output is in the `sample/build` directory.
37
38### 3. Create a new project
39
40The way to create a new project
41
42In the root directory of `compiler/`:
43```
44$ npm run build
45$ npm run create [projectName]
46```
47
48**Note**: If `projectName` is empty, create the `HelloAce` project by default.
49
50For example, use the following line to create a project named `foo`:
51```
52$ npm run create foo
53```
54The directory structure of project `foo`:
55- foo
56 - pages
57 - index.ets
58 - app.ets
59 - manifest.json
60
61### 4. Create a new page
62
63For example, create a file `bar.ets` in the `page` directory. And then add the following lines to `"page"` field in `manifest.json`:
64```
65 "pages": [
66 "pages/index",
67 "pages/bar"
68 ]
69```
70
71### 5. Compile a project
72
73The way to compile a project
74
75In the root directory of `compiler/`:
76```
77$ npm run build
78$ npm run compile [projectName]
79```
80
81**Note**: If `projectName` is empty, compile the `sample` project by default. In the project root directory, the compilation result is in the `build` directory.
82