You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ripple.apache.org by gt...@apache.org on 2013/10/21 04:42:42 UTC
[13/15] git commit: added more platforms for emulate on 3.0
added more platforms for emulate on 3.0
Project: http://git-wip-us.apache.org/repos/asf/incubator-ripple/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ripple/commit/b7720237
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ripple/tree/b7720237
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ripple/diff/b7720237
Branch: refs/heads/next
Commit: b7720237d5631002edec0785061a2200af84203e
Parents: 5553148
Author: Gord Tanner <gt...@gmail.com>
Authored: Sat Oct 12 22:59:49 2013 -0400
Committer: Gord Tanner <gt...@gmail.com>
Committed: Sat Oct 12 22:59:49 2013 -0400
----------------------------------------------------------------------
lib/server/emulate.js | 14 +++++++++++++-
lib/server/emulate/hosted.js | 2 +-
2 files changed, 14 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/b7720237/lib/server/emulate.js
----------------------------------------------------------------------
diff --git a/lib/server/emulate.js b/lib/server/emulate.js
index 9a9d9a1..625078a 100644
--- a/lib/server/emulate.js
+++ b/lib/server/emulate.js
@@ -67,9 +67,21 @@ module.exports = {
console.log("Cordova 3.0 Project detected...");
var platforms = fs.readdirSync(path.join(p, "platforms"));
if (platforms.indexOf('android') >= 0) {
- options.cordova = true;
+ options.cordova = 'android';
p = path.join(p, "platforms", "android", "assets", "www");
}
+ else if (platforms.indexOf('ios') >= 0) {
+ options.cordova = 'ios';
+ p = path.join(p, "platforms", "ios", "www");
+ }
+ else if (platforms.indexOf('firefoxos') >= 0) {
+ options.cordova = 'firefoxos';
+ p = path.join(p, "platforms", "firefoxos", "www");
+ }
+ else if (platforms.indexOf('blackberry10') >= 0) {
+ options.cordova = 'blackberry10';
+ p = path.join(p, "platforms", "blackberry10", "www");
+ }
} catch (e) {
//Not a cordova project
}
http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/b7720237/lib/server/emulate/hosted.js
----------------------------------------------------------------------
diff --git a/lib/server/emulate/hosted.js b/lib/server/emulate/hosted.js
index 0d2f6b2..1543362 100644
--- a/lib/server/emulate/hosted.js
+++ b/lib/server/emulate/hosted.js
@@ -163,7 +163,7 @@ function localInjection(opts) {
return function (req, res, next) {
if (req.query.enableripple && opts.cordova) {
console.log('refreshing project ..');
- exec('cordova prepare', function () {
+ exec('cordova prepare ' + opts.cordova, function () {
handle(req, res, next);
});
}