Directory Structure

The default directory structure is intended to provide a great starting point for both Progressive Web App and Cordova App.

The Root Directory

  • /res This directory contains platform specific resources such as launch icons, splash screens, configuration files etc. for the Cordova project.
  • /www This directory contains the project's HTML/CSS/JS assets.
  • config.xml It is a global configuration file that controls the Cordova app's behavior.

The www Directory

  • /assets This directory contains the CSS, JS, images, fonts assets.
  • /partials This directory contains the HTML files.
  • index.html This file is the entry point to the app.
  • manifest.json This web app manifest is a simple JSON file that tells the browser about your web application and how it should behave when installed on the user's mobile device or desktop.
  • service-worker.js This file empowers the PWA by enabling offline caching, background sync, push notifications etc.

The assets Directory

The assets directory contains two folders — custom and vendor
  • The vendor directory contains the core dependencies, third-party libraries and plugins used in the app.
  • The custom directory contains the custom assets such as images used in the app, CSS overrides or app-specific JavaScript functions.
It is highly recommended not to make any changes in CSS or JS files present inside the vendor directory. If you want to make any changes such as styling then you should override those CSS in custom.css file and put it inside custom/css directory.