var program = require('commander');

program
    .option('--target <targetDevice>', 'Deploy to specific target')
    .option('--list', 'Lists available targets')
    .option('--release', 'Deploy a release build')
    .option('--nobuild', 'Skip building')
    .option('--browserify', 'Compile plugin JS at build time using browserify instead of runtime')
    .option('--buildConfig <configFile>', 'Use the specified build configuration file.')
    .parse(process.argv);

console.log('build-config: ' + JSON.stringify(program.parseOptions(process.argv)));
@@ -33,82 +33,176 @@
 ');%0A
-%0Aprogram%0A    .option('--target %3CtargetDevice%3E', 'Deploy to specific target
+var execSync = require('child_process').execSync;%0Avar path = require('path');%0A%0Avar platforms;%0Avar resultCommand = 'cordova run';%0A%0Aprogram%0A    .arguments('%5Bplatforms...%5D
 ')%0A 
@@ -441,16 +441,84 @@
 ntime')%0A
+    .option('--target %3CtargetDevice%3E', 'Deploy to specific target')%0A
     .opt
@@ -607,83 +607,510 @@
    .
-parse(process.argv);%0A%0Aconsole.log(
+option('--platformSpecific %3CplatformOptions%3E', 'Provide platform specific options')%0A    .action(function(arg) %7B%0A        platforms = arg;%0A    %7D)%0A    .parse(process.argv);%0A%0Aplatforms = platforms %7C%7C %5B'browser'%5D;%0Aplatforms.forEach(function (el) %7B%0A    resultCommand += ' ' + el;%0A%7D);%0A%5B'list', 'release', 'nobuild', 'browserify'%5D.forEach(function (el) %7B%0A    if (program%5Bel%5D) %7B%0A        resultCommand += ' --' + el;%0A    %7D%0A%7D);%0A%5B'target', 
 'build
--c
+C
 onfig
-: ' + JSON.stringify
+', 'platformSpecific'%5D.forEach(function (el) %7B%0A    if 
 (program
 .par
@@ -1109,34 +1109,224 @@
 gram
-.parseOptions(process.argv))
+%5Bel%5D) %7B%0A        resultCommand += ' --' + (el === 'platformSpecific' ? ' ' : el + '=') +%0A            program%5Bel%5D;%0A    %7D%0A%7D);%0AexecSync(resultCommand, %7B%0A    stdio: 'inherit',%0A    cwd: path.join(process.cwd(), '/cordova')%0A%7D
 );

Add appsngen widget run command implementation