We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3c154c1 + 327574c commit 6d21374Copy full SHA for 6d21374
lib/targets/cordova/utils/parse-build-flags.js
@@ -33,13 +33,18 @@ const ANDROID_OPTS = [
33
];
34
35
module.exports = function(platform, options) {
36
- let buildKeys;
+ let platformKeys = [];
37
38
if (platform === 'ios') {
39
- buildKeys = CORDOVA_OPTS.concat(IOS_OPTS);
+ platformKeys = IOS_OPTS;
40
} else if (platform === 'android') {
41
- buildKeys = CORDOVA_OPTS.concat(ANDROID_OPTS);
+ platformKeys = ANDROID_OPTS;
42
}
43
44
- return _pick(options, buildKeys);
+ let ret = _pick(options, CORDOVA_OPTS.concat(platformKeys));
45
+ ret.argv = [].concat(...platformKeys
46
+ .filter((key) => options.hasOwnProperty(key))
47
+ .map((key) => [`--${key}`, options[key]]));
48
+
49
+ return ret;
50
};
0 commit comments