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