Differences between revisions 5 and 6
Revision 5 as of 2013-11-16 14:24:52
Size: 3283
Editor: jbondc
Comment:
Revision 6 as of 2014-01-30 23:23:20
Size: 3747
Editor: jbondc
Comment:
Deletions are marked like this. Additions are marked like this.
Line 9: Line 9:

TODO: This needs to be change to be more like 'plugin.xml' (hybrid app configuration file), cordova.xml
Line 40: Line 42:
`$PROJECT/plugins/<platform>.json` `{$NATIVE_PROJECT}/cordova/<platform>.json`
Line 44: Line 46:

== Installed Plugins and dependencies all platforms? ==
`{$CLI_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 (cli changes the plugin_dir)
 * Read by: Plugman (cli changes the plugin_dir)

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

TODO: This needs to be change to be more like 'plugin.xml' (hybrid app configuration file), cordova.xml

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

{$NATIVE_PROJECT}/cordova/<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

Installed Plugins and dependencies all platforms?

{$CLI_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 (cli changes the plugin_dir)
  • Read by: Plugman (cli changes the plugin_dir)

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

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