ts-framework-directory.md 1.5 KB
Newer Older
G
ge-yafang 已提交
1
# Directory Structure
Z
zengyawen 已提交
2 3


E
ester.zhou 已提交
4
The following figure shows the typical directory structure of the **ets** module (in **entry/src/main**) for an application with feature abilities (FAs).
G
ge-yafang 已提交
5 6 7 8


![en-us_image_0000001222967752](figures/en-us_image_0000001222967752.png)

Z
zengyawen 已提交
9

E
ester.zhou 已提交
10
The **ets** directory contains the following files:
Z
zengyawen 已提交
11

G
ge-yafang 已提交
12

E
ester.zhou 已提交
13
**.ets** files: Extended TypeScript (eTS) files that describe the UI layouts, styles, event interactions, and page logics.
Z
zengyawen 已提交
14 15 16

Functions of the folders and files are as follows:

E
ester.zhou 已提交
17
- The **app.ets** file manages global application logics and lifecycles.
G
ge-yafang 已提交
18

E
ester.zhou 已提交
19 20 21 22 23 24 25 26 27 28 29
- The **pages** directory stores all pages.

- The **common** directory stores common code files, such as files of custom components and public methods.


> **NOTE**
>
> - For details about the **resources** directory in **src/main**, see [Resource File Categories](ui-ts-basic-resource-file-categories.md).
>- TypeScript and JavaScript files can be imported as page files.

"js" tag configuration:
G
ge-yafang 已提交
30

E
ester.zhou 已提交
31
Configure the **"js"** tag in the configuration file of your application. The **"js"** tag contains the instance name, page route, and window configuration information.
G
ge-yafang 已提交
32

Z
zengyawen 已提交
33

E
ester.zhou 已提交
34
> **NOTE**
G
ge-yafang 已提交
35
>
E
ester.zhou 已提交
36
>  For details about the **"js"** tag in the FA model, see [Table 22 Internal structure of the js attribute](../quick-start/package-structure.md#internal-structure-of-the-js-attribute).
E
ester.zhou 已提交
37
>
E
ester.zhou 已提交
38
>  For details about the **"js"** tag in the stage model, see [Table 3 Internal structure of the module tag](../quick-start/stage-structure.md#internal-structure-of-the-module-tag).