diff options
| author | Jules Laplace <jules@okfoc.us> | 2016-11-08 11:46:59 -0500 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2016-11-08 11:46:59 -0500 |
| commit | 5fa81da81260d65113f57a293b6256d334fe8e2d (patch) | |
| tree | 01d3dd7ab7a1febccd20de1756d0801a64ae64e9 /StoneIsland/platforms/ios/cordova/run | |
| parent | e5652e9cd560ccda249819857c207643820b075f (diff) | |
| parent | 7773d1d0686de69504e9b820efdb3e94d72eff04 (diff) | |
le build
Diffstat (limited to 'StoneIsland/platforms/ios/cordova/run')
| -rwxr-xr-x | StoneIsland/platforms/ios/cordova/run | 41 |
1 files changed, 34 insertions, 7 deletions
diff --git a/StoneIsland/platforms/ios/cordova/run b/StoneIsland/platforms/ios/cordova/run index d2c376d5..470384b5 100755 --- a/StoneIsland/platforms/ios/cordova/run +++ b/StoneIsland/platforms/ios/cordova/run @@ -19,18 +19,45 @@ under the License. */ -var args = process.argv, - run = require('./lib/run'); + +var args = process.argv; +var Api = require('./Api'); +var nopt = require('nopt'); // Handle help flag -if (['--help', '/?', '-h', 'help', '-help', '/help'].indexOf(args[2]) > -1) { - run.help(); -} else { - run.run(args).done(function() { +if(['--help', '/?', '-h', 'help', '-help', '/help'].indexOf(process.argv[2]) >= 0) { + require('./lib/run').help(); + process.exit(0); +} + +// Parse arguments (includes build params as well) +var opts = nopt({ + 'verbose' : Boolean, + 'silent' : Boolean, + 'debug': Boolean, + 'release': Boolean, + 'nobuild': Boolean, + 'archs': String, + 'list': Boolean, + 'device': Boolean, + 'emulator': Boolean, + 'target' : String, + 'codeSignIdentity': String, + 'codeSignResourceRules': String, + 'provisioningProfile': String, + 'buildConfig' : String, + 'noSign' : Boolean +}, { 'd' : '--verbose' }, args); + +// Make options compatible with PlatformApi build method spec +opts.argv = opts.argv.remain; + +require('./loggingHelper').adjustLoggerLevel(opts); + +new Api().run(opts).done(function() { console.log('** RUN SUCCEEDED **'); }, function (err) { var errorMessage = (err && err.stack) ? err.stack : err; console.error(errorMessage); process.exit(2); }); -}
\ No newline at end of file |
