From 0e5150cd745d65c50fa43d0f3b87468c00a50a87 Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Wed, 1 Oct 2014 13:51:33 -0700 Subject: [PATCH] Fix building for mobile targets w/o a mobile control file --- tools/commands-cordova.js | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index a649056198..41f34b0939 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -1110,7 +1110,16 @@ var consumeControlFile = function (controlFilePath, cordovaPath) { code = fs.readFileSync(controlFilePath, 'utf8'); } - var metadata = {}; + var metadata = { + id: project.getAppIdentifier(), + version: '0.0.1', + name: path.dirname(project.rootDir), + description: 'New Meteor Mobile App', + author: 'A Meteor Developer', + email: 'n/a', + website: 'n/a' + }; + // set some defaults different from the Phonegap/Cordova defaults var additionalConfiguration = { 'webviewbounce': false, @@ -1136,24 +1145,12 @@ var consumeControlFile = function (controlFilePath, cordovaPath) { * @memberOf App */ info: function (options) { - var defaults = { - id: project.getAppIdentifier(), - version: '0.0.1', - name: path.dirname(project.rootDir), - description: 'New Meteor Mobile App', - author: 'A Meteor Developer', - email: 'n/a', - website: 'n/a' - }; - // check that every key is meaningful _.each(options, function (value, key) { - if (! _.has(defaults, key)) + if (! _.has(metadata, key)) throw new Error(key + ": unknown key in App.info configuration."); }); - options = _.extend(defaults, options); - _.extend(metadata, options); }, /**