cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Braden Shepherdson <bra...@chromium.org>
Subject Re: audit of configuration
Date Thu, 14 Nov 2013 20:19:34 GMT
As requested elsewhere, a summary of the various configuration and metadata
files in Cordova. I'm speaking here of a complete CLI project, but I'll
note which bits are CLI-only, and which apply to Plugman-only projects as
well.

First, the XML files:

$PROJECT/www/config.xml
- Top-level configuration for a CLI project: start page, app name, splash
screens, etc.
- Nickname: "app config.xml"
- CLI only
- Written by: users
- Read by: CLI, Plugman

$PROJECT/platforms/<platform>/.../config.xml (or
$NATIVEPROJECT/.../config.xml for Plugman-only).
- Final configuration loaded by the native code at runtime.
- Nickname: "platform config.xml"
- Written by: Plugman during prepare step
- Read by: Native platforms
- Automatically generated

$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.

$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

$SOMEPLUGIN/plugin.xml
- Specifies various bits of metadata about a plugin.
- Written by: plugin authors
- Read by: Plugman, CLI


And then the other metadata files:

$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

$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), users (edits)
- Read by: CLI

$HOME/.cordova/config.json
- Global configuration for CLI. Same format as config.json above.
- CLI only
- Written by: CLI (template), users (edits)
- Ready by: CLI

$HOME/.plugman/config
- Global configuration for Plugman. Stores username and auth tokens for
"plugman publish", etc.
- Written by: Plugman, users (if they want to override the plugin repo to
not be http://registry.cordova.io
- Read by: Plugman

Note that this is only Cordova-specific things, and doesn't mention
Android's AndroidManifest.xml or iOS's plist files, among many other
platform-specific files.

Hopefully this makes things a little clearer - I don't think this is
written down anywhere right now, just in my and Anis's heads.

Braden



On Thu, Nov 14, 2013 at 2:41 PM, Brian LeRoux <b@brian.io> wrote:

> http://www.youtube.com/watch?v=a1N2k0-F1pU
>
>
> On Thu, Nov 14, 2013 at 9:11 AM, Braden Shepherdson <braden@chromium.org
> >wrote:
>
> > We have reason not to move ./plugins/*.json into .cordova/config.json is
> > that the latter file doesn't exist unless you're using CLI, whereas
> Plugman
> > needs and maintains the ./plugins/*.json files.
> >
> > Braden
> >
> >
> > On Thu, Nov 14, 2013 at 9:19 AM, Michal Mocny <mmocny@chromium.org>
> wrote:
> >
> > > ;) http://xkcd.com/927/
> > >
> > > Some more data:
> > >
> > > - I've heard discussed before that ./plugins/*.json should be moved in
> to
> > > .cordova/config.json, it just hasn't happened yet.
> > > - The config.xml thats inside your app we've suggested be renamed to
> > > app.xml for less confusion with the final platform config.xml.
> > >
> > > I think there is no reasonable way around having plugin.xml, app.xml,
> > > defaults.xml, and final config.xml.
> > > I think it is fine to have a single local config for a cli project
> > > (.cordova/config.json) and a single global config for plugman/cli
> > > (~/.cordova, ~/.plugman).
> > >
> > > So I guess if the above two points were addressed I would be happy even
> > > though it seems like a lot at first glance.
> > >
> > > -Michal
> > >
> > >
> > > On Wed, Nov 13, 2013 at 11:58 PM, Brian LeRoux <b@brian.io> wrote:
> > >
> > > > Ok. Ya, obviously this is not ideal. I want to get a map of the road
> > > before
> > > > we try and throw a highway in. Or another config file.
> > > >
> > > >
> > > > On Wed, Nov 13, 2013 at 6:40 PM, Michal Mocny <mmocny@chromium.org>
> > > wrote:
> > > >
> > > > > - platforms/'s have defaults.xml and the final config.xml
> > > > > - ~/.cordova/...
> > > > > - ~/.plugman/config
> > > > >
> > > > > Welcome to our world.
> > > > >
> > > > >
> > > > > On Wed, Nov 13, 2013 at 5:45 PM, Steven Gill <
> stevengill97@gmail.com
> > >
> > > > > wrote:
> > > > >
> > > > > > each plugin has plugin.xml.
> > > > > >
> > > > > >
> > > > > > On Wed, Nov 13, 2013 at 2:36 PM, Brian LeRoux <b@brian.io>
> wrote:
> > > > > >
> > > > > > > So we currently have:
> > > > > > >
> > > > > > > - config.xml
> > > > > > > - .cordova/config.json
> > > > > > > - ./plugins/[PLATFORM].json
> > > > > > >
> > > > > > > Am I missing anything?
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message