Differences between revisions 1 and 5 (spanning 4 versions)
Revision 1 as of 2013-11-14 23:10:40
Size: 2783
Editor: JoshSoref
Comment: Import braden and anis's documentation of configuration files
Revision 5 as of 2013-11-16 14:24:52
Size: 3283
Editor: jbondc
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
== app config.xml == == App config.xml ==
Line 7: Line 7:
 * Written by: users  * Written by: app developers
Line 10: Line 10:
== platform config.xml == == Platform config.xml ==
Line 17: Line 17:
== accidental dummy platform config.xml == == accidental dummy Platform config.xml ==
Line 22: Line 22:
== defaults for platform config.xml == == Defaults for Platform config.xml ==
Line 45: Line 45:
== HTML App - JavaScript plugins & modules - loaded by cordova.js ==
`$PROJECT/platforms/<platform>/.../www/cordova_plugins.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)

Line 49: Line 59:
 * Written by: cordova create (template), users (edits)  * Written by: cordova create (template), app developers (edits)
Line 56: Line 66:
 * Written by: CLI (template), users (edits)  * Written by: CLI (template), app developers (edits)
Line 62: Line 72:
 * Written by: Plugman, users (if they want to override the plugin repo to not be http://registry.cordova.io  * Written by: Plugman, Plugman's developers (if they want to override the plugin repo to not be http://registry.cordova.io )

XML files

App config.xml

$PROJECT/www/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

$PROJECT/platforms/<platform>/.../www/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

$PROJECT/platforms/<platform>/.../defaults.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

$SOMEPLUGIN/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

$PROJECT/plugins/<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

$PROJECT/platforms/<platform>/.../www/cordova_plugins.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/.cordova/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

$HOME/.cordova/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

$HOME/.plugman/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.

Footer

From summary of research by Braden and Anis