You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2013/08/24 00:05:59 UTC

[1/5] git commit: add firefox platform

Updated Branches:
  refs/heads/ffos [created] 02668f6e3


add firefox platform


Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/0d1aa9be
Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/0d1aa9be
Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/0d1aa9be

Branch: refs/heads/ffos
Commit: 0d1aa9be146f2be564e1b2b9c797f70b3165819e
Parents: c775d2a
Author: James Long <lo...@gmail.com>
Authored: Wed Aug 14 15:36:16 2013 -0400
Committer: James Long <lo...@gmail.com>
Committed: Wed Aug 14 15:36:16 2013 -0400

----------------------------------------------------------------------
 platforms.js                     |  5 +++++
 src/metadata/firefoxos_parser.js | 19 +++++++++++++++++++
 2 files changed, 24 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/0d1aa9be/platforms.js
----------------------------------------------------------------------
diff --git a/platforms.js b/platforms.js
index 74d72ec..de2c2be 100644
--- a/platforms.js
+++ b/platforms.js
@@ -46,5 +46,10 @@ module.exports = {
     'www':{
         url    : 'https://git-wip-us.apache.org/repos/asf?p=cordova-app-hello-world.git',
         version: '3.0.0'
+    },
+    'firefoxos':{
+        parser: require('./src/metadata/firefoxos_parser'),
+        url    : 'https://github.com/jlongster/cordova-firefoxos.git',
+        version: '3.0.0'
     }
 };

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/0d1aa9be/src/metadata/firefoxos_parser.js
----------------------------------------------------------------------
diff --git a/src/metadata/firefoxos_parser.js b/src/metadata/firefoxos_parser.js
new file mode 100644
index 0000000..4ef985b
--- /dev/null
+++ b/src/metadata/firefoxos_parser.js
@@ -0,0 +1,19 @@
+var path = require('path');
+
+module.exports = function firefoxos_parser(project) {
+    this.path = project;
+};
+
+module.exports.check_requirements = function(project_root, callback) {
+    callback(false);
+};
+
+module.exports.prototype = {
+    www_dir: function() {
+        return path.join(this.path, 'www');
+    },
+
+    update_project: function(cfg, callback) {
+        callback();
+    }
+};


[5/5] git commit: Merge branch 'master' of github.com:jlongster/cordova-cli into ffos

Posted by st...@apache.org.
Merge branch 'master' of github.com:jlongster/cordova-cli into ffos


Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/02668f6e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/02668f6e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/02668f6e

Branch: refs/heads/ffos
Commit: 02668f6e301c4c089dd14bc45211a6ddf940639c
Parents: 6036bc4 18a8452
Author: Steven Gill <st...@gmail.com>
Authored: Fri Aug 23 15:05:13 2013 -0700
Committer: Steven Gill <st...@gmail.com>
Committed: Fri Aug 23 15:05:13 2013 -0700

----------------------------------------------------------------------
 platforms.js                     |   5 ++
 src/metadata/firefoxos_parser.js | 120 ++++++++++++++++++++++++++++++++++
 2 files changed, 125 insertions(+)
----------------------------------------------------------------------



[4/5] git commit: add default manifest properties for firefox os platform

Posted by st...@apache.org.
add default manifest properties for firefox os platform


Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/18a84520
Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/18a84520
Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/18a84520

Branch: refs/heads/ffos
Commit: 18a8452048033c0a407378169e620394be16bc0e
Parents: 786f8f0
Author: James Long <lo...@gmail.com>
Authored: Wed Aug 21 15:19:41 2013 -0400
Committer: James Long <lo...@gmail.com>
Committed: Wed Aug 21 15:19:41 2013 -0400

----------------------------------------------------------------------
 src/metadata/firefoxos_parser.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/18a84520/src/metadata/firefoxos_parser.js
----------------------------------------------------------------------
diff --git a/src/metadata/firefoxos_parser.js b/src/metadata/firefoxos_parser.js
index 6fa8105..e527fb3 100644
--- a/src/metadata/firefoxos_parser.js
+++ b/src/metadata/firefoxos_parser.js
@@ -37,7 +37,10 @@ module.exports.prototype = {
             manifest = JSON.parse(fs.readFileSync(manifestPath));
         }
         else {
-            manifest = {};
+            manifest = {
+                launch_path: "/index.html",
+                installs_allowed_from: ["*"]
+            };
         }
 
         manifest.version = version;


[3/5] git commit: make the firefoxos parser actually build the project

Posted by st...@apache.org.
make the firefoxos parser actually build the project


Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/786f8f06
Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/786f8f06
Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/786f8f06

Branch: refs/heads/ffos
Commit: 786f8f06d17206c239ae2cc086c0d5be777617c2
Parents: a3d8ce7
Author: James Long <lo...@gmail.com>
Authored: Wed Aug 21 14:12:39 2013 -0400
Committer: James Long <lo...@gmail.com>
Committed: Wed Aug 21 14:12:39 2013 -0400

----------------------------------------------------------------------
 src/metadata/firefoxos_parser.js | 100 +++++++++++++++++++++++++++++++++-
 1 file changed, 99 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/786f8f06/src/metadata/firefoxos_parser.js
----------------------------------------------------------------------
diff --git a/src/metadata/firefoxos_parser.js b/src/metadata/firefoxos_parser.js
index 4ef985b..6fa8105 100644
--- a/src/metadata/firefoxos_parser.js
+++ b/src/metadata/firefoxos_parser.js
@@ -1,4 +1,9 @@
+var fs = require('fs');
 var path = require('path');
+var shell = require('shelljs');
+var util = require('../util');
+var config_parser = require('../config_parser');
+var config = require('../config');
 
 module.exports = function firefoxos_parser(project) {
     this.path = project;
@@ -9,11 +14,104 @@ module.exports.check_requirements = function(project_root, callback) {
 };
 
 module.exports.prototype = {
+    update_from_config: function(config, callback) {
+        if (!(config instanceof config_parser)) {
+            var err = new Error('update_from_config requires a config_parser object');
+            if (callback) {
+                callback(err);
+                return;
+            }
+            else {
+                throw err;
+            }
+        }
+
+        var name = config.name();
+        var pkg = config.packageName();
+        var version = config.version();
+
+        var manifestPath = path.join(this.www_dir(), 'manifest.webapp');
+        var manifest;
+
+        if(fs.existsSync(manifestPath)) {
+            manifest = JSON.parse(fs.readFileSync(manifestPath));
+        }
+        else {
+            manifest = {};
+        }
+
+        manifest.version = version;
+        manifest.name = name;
+        manifest.pkgName = pkg;
+        fs.writeFileSync(manifestPath, JSON.stringify(manifest));
+
+        if(callback) {
+            callback();
+        }
+    },
+
     www_dir: function() {
         return path.join(this.path, 'www');
     },
 
+    update_www: function() {
+        var projectRoot = util.isCordova(this.path);
+        var projectWww = util.projectWww(projectRoot);
+        var platformWww = this.www_dir();
+
+        shell.rm('-rf', platformWww);
+        shell.cp('-rf', projectWww, this.path);
+
+        var customPath = config.has_custom_path(projectRoot, 'firefoxos');
+        var libPath = (customPath ?
+                       customPath :
+                       path.join(util.libDirectory, 'firefoxos', 'cordova',
+                                 require('../../platforms').ios.version));
+        shell.cp('-f',
+                 path.join(libPath, 'cordova-lib', 'cordova.js'),
+                 path.join(platformWww, 'cordova.js'));
+    },
+
+    update_overrides: function() {
+        var projectRoot = util.isCordova(this.path);
+        var mergesPath = path.join(util.appDir(projectRoot), 'merges', 'firefoxos');
+        if(fs.existsSync(mergesPath)) {
+            var overrides = path.join(mergesPath, '*');
+            shell.cp('-rf', overrides, this.www_dir());
+        }
+    },
+
+    update_staging: function() {
+        var projectRoot = util.isCordova(this.path);
+        var stagingDir = path.join(this.path, '.staging', 'www');
+
+        if(fs.existsSync(stagingDir)) {
+            shell.cp('-rf',
+                     path.join(stagingDir, '*'),
+                     this.www_dir());
+        }
+    },
+
     update_project: function(cfg, callback) {
-        callback();
+        this.update_www();
+
+        this.update_from_config(cfg, function(err) {
+            if(err) {
+                if(callback) {
+                    callback(err);
+                }
+                else {
+                    throw err;
+                }
+            } else {
+                this.update_overrides();
+                this.update_staging();
+                util.deleteSvnFolders(this.www_dir());
+
+                if(callback) {
+                    callback();
+                }
+            }
+        }.bind(this));
     }
 };


[2/5] git commit: change firefoxos link to tarball

Posted by st...@apache.org.
change firefoxos link to tarball


Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/a3d8ce79
Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/a3d8ce79
Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/a3d8ce79

Branch: refs/heads/ffos
Commit: a3d8ce7972cbe8671c5e28cc6e3b666fa80e0382
Parents: 0d1aa9b
Author: James Long <lo...@gmail.com>
Authored: Wed Aug 14 15:55:55 2013 -0400
Committer: James Long <lo...@gmail.com>
Committed: Wed Aug 14 15:55:55 2013 -0400

----------------------------------------------------------------------
 platforms.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/a3d8ce79/platforms.js
----------------------------------------------------------------------
diff --git a/platforms.js b/platforms.js
index de2c2be..248100d 100644
--- a/platforms.js
+++ b/platforms.js
@@ -49,7 +49,7 @@ module.exports = {
     },
     'firefoxos':{
         parser: require('./src/metadata/firefoxos_parser'),
-        url    : 'https://github.com/jlongster/cordova-firefoxos.git',
+        url    : 'https://github.com/jlongster/cordova-firefoxos/archive/0.0.1.tar.gz',
         version: '3.0.0'
     }
 };