[jira] [Commented] (CB-6024) nopt refactoring
[ https://issues.apache.org/jira/browse/CB-6024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14080806#comment-14080806 ] ASF subversion and git services commented on CB-6024: - Commit 3ccbe098885241b29a502eb4e8947821ad41c8a2 in cordova-docs's branch refs/heads/master from [~cmarcelk] [ https://git-wip-us.apache.org/repos/asf?p=cordova-docs.git;h=3ccbe09 ] CB-6024 have the html docs point to the text docs > 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)
[jira] [Commented] (CB-6024) nopt refactoring
[ https://issues.apache.org/jira/browse/CB-6024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14080243#comment-14080243 ] ASF GitHub Bot commented on CB-6024: Github user asfgit closed the pull request at: https://github.com/apache/cordova-cli/pull/187 > 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)
[jira] [Commented] (CB-6024) nopt refactoring
[ https://issues.apache.org/jira/browse/CB-6024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14080137#comment-14080137 ] ASF subversion and git services commented on CB-6024: - Commit 7123ae03004fdb81e6c3fb09355e3a26cc907222 in cordova-cli's branch refs/heads/master from [~jsoref] [ https://git-wip-us.apache.org/repos/asf?p=cordova-cli.git;h=7123ae0 ] CB-6024 Document -- for platform options Before CB-6024, you could do things like: cordova run platform --platformopt now you need to do: cordova run platform -- --platformopt > 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)
[jira] [Commented] (CB-6024) nopt refactoring
[ https://issues.apache.org/jira/browse/CB-6024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14080135#comment-14080135 ] ASF subversion and git services commented on CB-6024: - Commit 7123ae03004fdb81e6c3fb09355e3a26cc907222 in cordova-cli's branch refs/heads/master from [~jsoref] [ https://git-wip-us.apache.org/repos/asf?p=cordova-cli.git;h=7123ae0 ] CB-6024 Document -- for platform options Before CB-6024, you could do things like: cordova run platform --platformopt now you need to do: cordova run platform -- --platformopt > 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)
[jira] [Commented] (CB-6024) nopt refactoring
[ https://issues.apache.org/jira/browse/CB-6024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14080115#comment-14080115 ] ASF GitHub Bot commented on CB-6024: Github user kamrik commented on the pull request: https://github.com/apache/cordova-cli/pull/187#issuecomment-50691123 Looks good. > 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)
[jira] [Commented] (CB-6024) nopt refactoring
[ https://issues.apache.org/jira/browse/CB-6024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14080101#comment-14080101 ] ASF GitHub Bot commented on CB-6024: GitHub user jsoref opened a pull request: https://github.com/apache/cordova-cli/pull/187 CB-6024 Document -- for platform options CB-6024 Document -- for platform options Before CB-6024, you could do things like: cordova run platform --platformopt now you need to do: cordova run platform -- --platformopt You can merge this pull request into a Git repository by running: $ git pull https://github.com/jsoref/cordova-cli cb_6024 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-cli/pull/187.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #187 commit 0715a14cc67529677c314185f045cc0f0ecc8ac9 Author: Steven Gill Date: 2014-07-22T23:47:21Z checking for browserify flag commit b438aec732fcffe20d8f82fe76459561d9973a94 Author: Suraj Pindoria Date: 2014-07-24T18:22:50Z Added browserify flag to cli options commit d158f4054f10655272e49707f297cf5e3c41c5d0 Author: Steven Gill Date: 2014-07-30T21:57:34Z Merge branch 'CB-7001' of github.com:surajpindoria/cordova-cli commit a0c3a7cb6db35d0012715111f3c73ce025e3f9c5 Author: Josh Soref Date: 2014-07-30T22:32:53Z CB-6024 Document -- for platform options Before CB-6024, you could do things like: cordova run platform --platformopt now you need to do: cordova run platform -- --platformopt > 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)
[jira] [Commented] (CB-6024) nopt refactoring
[ https://issues.apache.org/jira/browse/CB-6024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14080075#comment-14080075 ] Josh Soref commented on CB-6024: This changed how {{cordova run blackberry10 --keystorepass xxx}} works (it broke it). CB-7220 documents that you now need to do: {{cordova run blackberry10 -\- --keystorepass xxx}} > 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)
[jira] [Commented] (CB-6024) nopt refactoring
[ https://issues.apache.org/jira/browse/CB-6024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14038224#comment-14038224 ] Parashuram commented on CB-6024: I think the above proposal also works well given that platforms will not just be node modules. They will be consumed using the node API instead of calling commands directly. > 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)
[jira] [Commented] (CB-6024) nopt refactoring
[ 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)
[jira] [Commented] (CB-6024) nopt refactoring
[ https://issues.apache.org/jira/browse/CB-6024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14037971#comment-14037971 ] Parashuram commented on CB-6024: This approach will also mean that adding additional command line parameters to platforms would require a CLI change. Given that Cordova is moving towards releasing the platforms and the CLI separately, will that not be a problem ? > 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)
[jira] [Commented] (CB-6024) nopt refactoring
[ https://issues.apache.org/jira/browse/CB-6024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14037815#comment-14037815 ] Mark Koudritsky commented on CB-6024: - One options would be cordova emulate windows --vm=store cordova emulate windows --flavor=phone This way CLI only knows about --flavor flag and we can expand the set of its possible values in the platform without any changes in CLI. We can probably come up with a better name than "flavor" :) Some possible names --type, --variant, --emulator, --vm --vm is my favorite. > 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)
[jira] [Commented] (CB-6024) nopt refactoring
[ https://issues.apache.org/jira/browse/CB-6024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14037775#comment-14037775 ] Sergey Grebnov commented on CB-6024: What is the recommended way of adding additional platform specific parameters after this change? For example, for Windows 8.1 and Universal Apps whether we will support both Windows 8.1 and Windows Phone 8.1 we will want to add additional parameter to 'cordova emulate' to specify whether to run build on Windows or Windows Phone, for example cordova windows emulate --phone <-test windows phone 8.1 cordova windows emulate --store <- test windows8.1 cordova windows emulate --store80 <- test windows8 Right now all new unknown parameters are ignored and not passed to downstream. I see that special '--' arg could be used to pass additional ars but I don't think this will be very nature to require users to use '--', like cordova windows emulate -- --phone So it looks like any change in supported platform args will require cordova-cli update. So we won't be able to release platform w/o releasing cordova-cli. Any recommendations or ideas? > 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)
[jira] [Commented] (CB-6024) nopt refactoring
[ https://issues.apache.org/jira/browse/CB-6024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14019900#comment-14019900 ] Mark Koudritsky commented on CB-6024: - I don't think there is a need to replace optimist in createmobilespec, it's used there in a nice and clean way (unlike it was in cordova-cli) so we can leave it as is until we start hitting real problems with it. I'm not aware of any other places that use optimist, so I consider the "nopt" part done. > 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)
[jira] [Commented] (CB-6024) nopt refactoring
[ https://issues.apache.org/jira/browse/CB-6024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14019855#comment-14019855 ] Marcel Kinard commented on CB-6024: --- What is the scope of this refactoring? For example, optimist is used in cordova-mobile-spec/createmobilespec/createmobilespec.js. Is it your intention to target all places where optimist is used, or just lib and 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)
[jira] [Commented] (CB-6024) nopt refactoring
[ 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)
[jira] [Commented] (CB-6024) nopt refactoring
[ https://issues.apache.org/jira/browse/CB-6024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14019490#comment-14019490 ] ASF subversion and git services commented on CB-6024: - Commit d8a971735bfc2da4a90fcd9f27345e29305c57cf in cordova-lib's branch refs/heads/master from [~kamrik] [ https://git-wip-us.apache.org/repos/asf?p=cordova-lib.git;h=d8a9717 ] CB-6024: Accept cli vars as part of opts param This is part of the nopt refacoring in cordova-cli. The old spaghetti logic for extracting options and variables from the arguments is kept, but should probably be removed soon. > 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)
[jira] [Commented] (CB-6024) nopt refactoring
[ https://issues.apache.org/jira/browse/CB-6024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13970349#comment-13970349 ] Andrew Grieve commented on CB-6024: --- Status on this? > 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.5.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)
[jira] [Commented] (CB-6024) nopt refactoring
[ https://issues.apache.org/jira/browse/CB-6024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13901556#comment-13901556 ] Jonathan Bond commented on CB-6024: --- Pull requests: https://github.com/apache/cordova-cli/pull/129 https://github.com/apache/cordova-plugman/pull/48 > 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 > Labels: patch > Fix For: 3.5.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.1.5#6160)