Differences between revisions 4 and 5
Revision 4 as of 2014-01-31 20:07:40
Size: 2516
Editor: jbondc
Comment:
Revision 5 as of 2014-02-02 19:00:50
Size: 3301
Editor: jbondc
Comment:
Deletions are marked like this. Additions are marked like this.
Line 34: Line 34:
  <!-- engine specific config, why engine? api-environment/context?  -->
  <engine name="cordova">
  <!-- Rename cordova/worklight... "engine" to view? -->
  <view name="cordova">
Line 38: Line 38:
  </engine>   </view>
Line 40: Line 40:
  <!-- <engine name="cordova" ..> ? -->
Line 53: Line 54:
=== Install meta: {$CLI_PROJECT}/plugins/{$PLATFORM_RUNTIME}.json === XML namespacing is great in theory, never worked well on the web.
Line 55: Line 56:
- All required metadata about installed plugins for a specific platform. === Install meta: {$CLI_PROJECT}/platforms/{$PLATFORM_RUNTIME}/cordova/project.json ===

 - All required metadata for a native cordova project: current version in the project, ...?
 
 - All required metadata about installed plugins for a specific platform.
Line 58: Line 63:
- Need enough info to uninstall & re-install a plugin properly.  - Need enough info to uninstall & re-install a plugin properly (list of files installed + version number).
Line 63: Line 68:
http://dev.w3.org/2006/waf/widgets/
https://developer.mozilla.org/en-US/Apps/Developing/Manifest
 - http://dev.w3.org/2006/waf/widgets/
 - https://developer.mozilla.org/en-US/Apps/Developing/Manifest
Line 82: Line 87:
=== Defaults: {$CLI_PROJECT}/.cordova/defaults.xml === === Defaults: {$CLI_PROJECT}/platforms/{$PLATFORM_RUNTIME}/cordova/project/defaults/ ===
Line 86: Line 91:
=== TODO === === NOTES ===
Line 88: Line 93:
Where should plugman / independant project store it's configs? Some objectives:
 - cli should write plugin information to the same place as 'plugman' (cordova project)
   offers an aggregate view over all installed platform projects.

 - must be able to safely rollback changes to a previous change.
   project.transaction();
   project.rollback();
   project.commit();

 - must be able to add a different plugin version to a specific native platform

{{{
e.g. plugin list

org.apache.cordova.file 0.2.5
org.apache.cordova.camera 0.2.6 (ios, windows8)
org.apache.cordova.camera 0.2.5 (android)

Cordova configs

- {$PLATFORM_RUNTIME} is either just "android" (default runtime) or "android.chromeview" (alternative runtime) - {$CLI_PROJECT} is the root the cordova cli

Hybrid: {$CLI_PROJECT}/config.xml

<app>
 <!-- default/global configuration of application -->
 <name>Some app</name>
 <version>1.0.1</version>
 <icon></icon>

 
 <!-- platform specific config and/or overrides  -->
 <platform name="ios">
    <version build="2">1.0.1</version>
    <icon id="foo@2x">path</icon>    
 </platform>

 <platform name="android">
    <version release="1.0.0" .../>
    <icon/>    
    
     <!-- runtime specific config and/or overrides  -->
    <runtime name="chromeview">
        <name>Some app (beta!)</name>
        <dosomething />    
    </runtime>

 </platform>

  <!-- Rename cordova/worklight... "engine" to view?  -->
  <view name="cordova">
     <content src="index.html" />
     <access origin="*" />
  </view>

  <!-- <engine name="cordova" ..> ? -->
  <!-- <webview name="cordova" ..> ? -->
  <!-- <api name="cordova" ..> -->
  <!-- <context name="cordova" ..> ? -->
  <!-- <env name="cordova" ..> ? -->
  <!-- <js-env name="cordova" ..> ? -->
  <!-- <hostenv name="cordova" ..> ? -->
  
</app>

Could keep 'config.xml' and create new "cordova" namespace: http://phonegap.com/blog/2014/01/30/customizing-your-android-manifest-and-ios-property-list-on-phonegap-build/

XML namespacing is great in theory, never worked well on the web.

Install meta: {$CLI_PROJECT}/platforms/{$PLATFORM_RUNTIME}/cordova/project.json

  • - All required metadata for a native cordova project: current version in the project, ...? - All required metadata about installed plugins for a specific platform.

(needs to convert all necessary plugin.xml information into a json format)

  • - Need enough info to uninstall & re-install a plugin properly (list of files installed + version number).

Runtime meta: {$CLI_PROJECT}/platforms/{$PLATFORM_RUNTIME}/www/wat.json

"WAT" --> "Web app technology? Existing configs:

Typically this would be loaded by the WebView / browser.

{
 "name": "Some app!",
 "version": "1.0.1",
 "meta": { /* meta-data (auto-generated by cli/plugman)

   "cordova": {
     "plugins": [], /* list of plugins installed */
     "modules": []  /* list of modules to load dynamically (if needed) */
    }
 }
}

Defaults: {$CLI_PROJECT}/platforms/{$PLATFORM_RUNTIME}/cordova/project/defaults/

Store all global configuration & platform defaults in a single file

NOTES

Some objectives:

  • - cli should write plugin information to the same place as 'plugman' (cordova project)
    • offers an aggregate view over all installed platform projects.
    - must be able to safely rollback changes to a previous change.
    • project.transaction(); project.rollback(); project.commit();
    - must be able to add a different plugin version to a specific native platform

config/cordova.xml (last edited 2014-06-03 16:52:53 by jbondc)