2.0 Folder structure
Image 1
2.1 Two package.json structure
As with any Aurelia app, build tools often require many different node modules. These node modules are only used for development, and are not needed when running the app in production. Based on the recommendation of electron-builder, the piece of software we use to deploy Monterey, we implemented the "Two package.json structure" where there is one package.json file in the root folder and one package.json file in the app folder. The package.json in the root folder contains dependencies such as babel
, gulp
and typescript
, things we use in development. The package.json file in the app folder contains dependencies such as mkdirp
which are used by the Monterey application in production. The node_modules folder in the root is roughly 330MB in size, while the node_modules folder in the app directory is only 76MB in size. Because of this "two package.json structure" we can simply deploy only app
folder, ignoring everything else in the root folder.
App folder structure
The following directories are in the "app" folder.
Folder | Description |
---|---|
dist | Contains the transpiled version of the typescript source files |
doc | Contains CHANGELOG.md |
images | Contains all images that are used by Monterey |
scripts | This folder contains javascript files that cannot be used via JSPM. |
src | Contains all typescript and html files |
styles | Contais CSS files of Bootstrap, Kendo and LESS stylesheets of Monterey |
test | Contains unit tests |
2.2 Src folder structure
Folder | Description |
---|---|
landing | The landing screen is the screen that's shown to the user after starting up monterey for the first time |
main | The main screen is the screen that's always active and is shown after the user creates/selects a project in the landing screen. The main screen consists of the project list, tiles list and footer. |
plugins | Contains all Monterey plugins (see Plugin system chapter) |
scaffolding | This folder contains all files for the project scaffolding wizard |
shared | Contains all typescripts and html files that do not fall in any of the above categories and/or are used by multiple parts of the Monterey application. |