[
https://issues.apache.org/jira/browse/CB-6024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14019491#comment-14019491
]
ASF subversion and git services commented on CB-6024:
-----------------------------------------------------
Commit b5b4a14a2f8bdf43fcf098884ea70af109d596a2 in cordova-cli's branch
refs/heads/master from [~kamrik]
[ https://git-wip-us.apache.org/repos/asf?p=cordova-cli.git;h=b5b4a14 ]
CB-6024: Use nopt instead of optimist in cli
Why:
- Optimist was killed by the author (he recommends minimist as replacement)
- We already use nopt in plugman cli
- Make cli parsing cleaner
Changes:
- No more manual parsing of the args array
- cli vars for plugin add passed down as part of opts, not part of targets
- cli is now a regular function rather than a class, it was never properly
used as a class.
- Flags to be passed to platform run scripts are parsed by nopt.
- To pass arbitrary flags unknown to cli down to platform scripts,
they must be separated by " -- " from other args, for example:
cordova compile ios -- -d --foo=bar
anything after " -- " will not be interpreted by the cli.
> 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)