# Directory structure
The Mini Program contains an object that describes the overall program app
And a plurality of ones that describe the respective pages of Page
。
The body of an application consists of three files that must be placed in the root directory of the project, as follows:
file | essential | Effect |
---|---|---|
app.js | yes | Mini Program logic |
app.json | yes | Mini Program public configuration |
app.wxss | no | Mini Program public style sheet |
A Mini Program page consists of four files, which are:
File type | essential | Effect |
---|---|---|
js | yes | Page logic |
wxml | yes | Page structure |
[json](./config.md#Page configuration) | no | Page configuration |
wxss | no | Page Style Sheets |
Note: In order for developers to reduce configuration items, the four files that describe the page must have the same path and filename.
# Files that are allowed to be uploaded
In the project directory, the following files are compiled and therefore not directly accessible after uploading:.js、apagejson、.wxml、*. Wxss (which wxml and wxss The file is only available in the app.json Pages configured in). In addition, only files with suffix names in the whitelist can be uploaded, and files that are not in the whitelier list can be accessed by the developer tools, but cannot be uploaded. The white list is as follows:
- wxs
- png
- jpg
- jpeg
- gif
- svg
- json
- cer
- mp3
- AAC
- m4a
- mp4
- wav
- ogg
- silk
- wasm
- br
- cert