[ 
https://issues.apache.org/jira/browse/CB-6024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14038175#comment-14038175
 ] 

Andrew Grieve commented on CB-6024:
-----------------------------------

It's pretty important that all flags appear in the --help text, so I don't 
think it's avoidable to have to change CLI the way things are set up.

That said, there's been some talk now that platforms are set up with a 
package.json, that they could provide a JS API.

E.g. we could have each platform optionally export a function that stuff more 
flags into nopt as well as into the help text.

E.g.
{code}
var platform = require('./path/to/cordova-wp8');
if (platform.initExtraBuildFlags) {
  platform.initExtraBuildFlags(nopt, helpText);
}
{code}

For this to work, we'd need to re-work how we do help text in CLI (right now 
it's just a plain-text file). That said, I think re-working would be a bonus as 
it'd be nice if you could do "cordova help command" or "cordova build --help" 
and get the help text for just that command instead of a dump of the whole text 
file.

> nopt refactoring
> ----------------
>
>                 Key: CB-6024
>                 URL: https://issues.apache.org/jira/browse/CB-6024
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: CLI, Plugman
>    Affects Versions: 3.3.0
>         Environment: Windows, Mac OSX
>            Reporter: Jonathan Bond
>            Assignee: Mark Koudritsky
>              Labels: patch
>             Fix For: 3.6.0
>
>
> As per mailing list:
> - Refactoring cli to use nopt. 
> - Several improvements to the install/uninstall tests to touch the file 
> system.
> - Consistency improvements in the code



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to