With a different Cordova version, the file and folder structure of a Monaca project is configured differently.
File/Folder Name | Description |
---|---|
plugins/ | Storage folder for additional plugins |
res/ |
Resources folder for Android, iOS and Winrt |
www/ | Storage folder for the main body of the application |
config.xml | Application configuration file |
File/Folder Name | Description |
---|---|
plugins/ | Storage folder for additional plugins |
res/ |
Resources folder for Android, iOS and Winrt |
www/ | Storage folder for the main body of the application |
config.xml | Application configuration file |
package.json |
Cordova plugins management file |
Files of the application’s main body are stored here. Files and folders
can be arranged freely within this www
folder, but the following files
and folders have special significance.
File/Folder Name | Description |
---|---|
index.html |
The first page to be displayed when the application starts up. The startup file can be changed. |
components/ | The folder created by Monaca for all JS/CSS components used in the project. |
The folder www/components/
is for all JS/CSS components used in the
project. However, the following two files exist in that folder by
default regardless of what kinds of components you have added for your
project.
File Name | Description |
---|---|
loader.js |
A JavaScript file used by Monaca to load JavaScript libraries |
loader.css |
A style sheet file used by Monaca to load CSS libraries |
The loader.js
and loader.css
files must be read from an HTML file.
Each component will create its own folder within (one level below)
www/components/
folder.
loader.js
file also loads cordova.js
file.
If you import a Cordova plugin using ZIP file, it will be stored inside this folder. However, if you import the plugin using package URL/Plugin ID, the plugin file will be downloaded during build.
The config.xml
file is a settings file controlling various settings of Cordova. Please refer to the following documentations regarding how to edit config.xml
file for Android and iOS:
config.xml
file is also used to config either Android or iOS application settings. Please refer to
Cordova Custom Config Plugin.
See Also: