Fix building for mobile targets w/o a mobile control file

This commit is contained in:
Slava Kim
2014-10-01 13:51:33 -07:00
committed by Justin SB
parent 29f2682fe0
commit 0e5150cd74

View File

@@ -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);
},
/**