Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

The directory structure


May 17, 2021 WeChat Mini Program Development Document



The directory structure

A small program contains an app that describes the overall program and multiple pages that describe their respective pages.

A small program body consists of three files that must be placed at the root of the project, as follows:

File Necessary Role
app.js Is Small program logic
app.json Is The common configuration of the small program
app.wxss Whether Small program public style sheet

A small program page consists of four files:

The file type Necessary Role
Js Is Page logic
wxml Is The page structure
Json Whether The page configuration
wxss Whether The page style sheet

Note: In order for developers to reduce configuration items, the four files that describe the page must have the same path and file name.

Files that are allowed to be uploaded

In the project directory, the following files are compiled so that they cannot be accessed directly after upload: .js, app.json, .wxml, .wxss (where wxml, and wxs files are only for pages configured in app.json). I n addition, only files with suffix names in the whitelist can be uploaded, and files that are not on the whitelist list can be accessed in the development tool, but not uploaded. The list of specific whitelists is as follows:

  1. wxs
  2. Png
  3. Jpg
  4. Jpeg
  5. Gif
  6. Svg
  7. Json
  8. Cer
  9. mp3
  10. Aac
  11. m4a
  12. mp4
  13. Wav
  14. ogg
  15. silk