Differences between revisions 4 and 5
Revision 4 as of 2013-11-15 20:00:49
Size: 3192
Editor: jbondc
Comment: Added info about 'cordova_plugins.js'
Revision 5 as of 2013-11-16 14:24:52
Size: 3283
Editor: jbondc
Deletions are marked like this. Additions are marked like this.
Line 45: Line 45:
== HTML App - JavaScript modules - loaded by cordova.js == == HTML App - JavaScript plugins & modules - loaded by cordova.js ==
Line 47: Line 47:
 * Metadata about what JavaScript modules (from plugins) should be loaded at runtime on this platform.  * Array of JavaScript modules (from plugins) loaded at runtime on this platform.
Line 51: Line 51:

 * Since cordova v3.2 - includes list of installed plugins (mapping from plugin IDs to versions)

XML files

App config.xml


  • Top-level configuration for a CLI project: start page, app name, splash screens, etc.
  • CLI only
  • Written by: app developers
  • Read by: CLI, Plugman

Platform config.xml

$PROJECT/platforms/<platform>/.../config.xml (or $NATIVEPROJECT/.../config.xml for Plugman-only).

  • Final configuration loaded by the native code at runtime.
  • Written by: Plugman during prepare step
  • Read by: Native platforms
  • Automatically generated

accidental dummy Platform config.xml


  • Dummy config.xml, a copy of the top-level app config.xml above.
    • This is an accident of how CLI copies the www/ directory and should be ignored.

Defaults for Platform config.xml


  • Default configuration values for each platform.
  • Used by CLI and Plugman as the basis for building the platform config.xml
    • above: the final platform config.xml = defaults.xml + plugin changes + app config.xml changes.
  • CLI only (present but ignored by Plugman-only projects)
  • Written by: Cordova platform developers
  • Read by: Plugman, CLI

Plugin plugin.xml


  • Specifies various bits of metadata about a plugin.
  • Written by: plugin authors
  • Read by: Plugman, CLI

Other metadata files

Installed Plugins and dependencies for platform json


  • Metadata about what plugins are installed (top-level or as dependencies) on this platform, and what config-file changes have been made.
  • Written by: Plugman
  • Read by: Plugman

HTML App - JavaScript plugins & modules - loaded by cordova.js


  • Array of JavaScript modules (from plugins) loaded at runtime on this platform.

  • Reads installed plugins from: $PROJECT/plugins/<platform>.json

  • Written by: Plugman during prepare step
  • Automatically generated
  • Since cordova v3.2 - includes list of installed plugins (mapping from plugin IDs to versions)

Project config.json


  • Project-specific configuration for CLI. Sets the project name, as well as allowing users to override where libraries (like cordova-android, cordova-ios, etc.) are lazy-loaded from (local disk, different versions, etc.)
  • CLI only
  • Written by: cordova create (template), app developers (edits)
  • Read by: CLI

Cordova user config.json


  • Global configuration for CLI. Same format as config.json above.
  • CLI only
  • Written by: CLI (template), app developers (edits)
  • Ready by: CLI

Cordova Plugman user config


  • Global configuration for Plugman. Stores username and auth tokens for "plugman publish", etc.
  • Written by: Plugman, Plugman's developers (if they want to override the plugin repo to not be http://registry.cordova.io )

  • Read by: Plugman

Not Documented

  • Android's AndroidManifest.xml

  • iOS's plist files
  • other platform-specific files.


From summary of research by Braden and Anis

ConfigurationFiles (last edited 2014-01-30 23:23:20 by jbondc)