You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by audreyso <gi...@git.apache.org> on 2017/02/03 20:07:11 UTC
[GitHub] cordova-cli pull request #267: CB: 11982 -Created new cordova config command
GitHub user audreyso opened a pull request:
https://github.com/apache/cordova-cli/pull/267
CB: 11982 -Created new cordova config command
* Not ready to review yet. Thanks!
<!--
Please make sure the checklist boxes are all checked before submitting the PR. The checklist
is intended as a quick reference, for complete details please see our Contributor Guidelines:
http://cordova.apache.org/contribute/contribute_guidelines.html
Thanks!
-->
### Platforms affected
### What does this PR do?
Created new cordova config command (edit, ls, delete, get, set)
### What testing has been done on this change?
### Checklist
- [X] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database
- [X] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected.
- [X] Added automated test coverage as appropriate for this change.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/audreyso/cordova-cli CB-11982
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cordova-cli/pull/267.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 #267
----
commit 6f54ddf4e47230b05caab28c7df3c6b99d84d6fc
Author: Audrey So <au...@apache.org>
Date: 2017-01-31T23:27:34Z
CB-11982 : added config command that sets, gets, and deletes
commit 1356e1289e851b2ca8ee2226bee4c11386d5ff75
Author: Audrey So <au...@apache.org>
Date: 2017-02-02T00:00:56Z
CB-11982 : added jasmine tests to test config get, set and delete
commit 9c9e65ff30020a382c9e6ab3e8719a56eeb8e086
Author: Audrey So <au...@apache.org>
Date: 2017-02-02T01:36:39Z
CB-11982 : updated config command if save, fetch, or browserify is undefined
commit e585a9cc4290021e1d37911a54f5cfc3989f5b60
Author: Audrey So <au...@apache.org>
Date: 2017-02-03T00:39:39Z
CB-11982 : added edit and ls to delete command
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-cli issue #267: CB: 11982 -Created new cordova config command
Posted by audreyso <gi...@git.apache.org>.
Github user audreyso commented on the issue:
https://github.com/apache/cordova-cli/pull/267
@filmaj Thanks for your help! :)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-cli pull request #267: CB: 11982 -Created new cordova config command
Posted by stevengill <gi...@git.apache.org>.
Github user stevengill commented on a diff in the pull request:
https://github.com/apache/cordova-cli/pull/267#discussion_r112310792
--- Diff: doc/config.txt ---
@@ -0,0 +1,20 @@
+Synopsis
+
+ cordova-cli config <command> [options]
+
+
+The config command can be used to set, get, delete, and edit the
+contents of the user files.
+
+Options
+--set <key> <value> .............................. Sets the config key to the value.If value is omitted, then it sets it to "true".
+--get <key> ...................................... Echo the config value to stdout.
+--delete <key> ................................... Deletes the key from all configuration files.
+--edit ........................................... Opens the config file in an editor.
+
+Example
+
+cordova-cli config set <key> <value> --> cordova config set autosave true
+cordova-cli config get <key> --> cordova config get autosave
+cordova-cli config delete <key> --> cordova config delete autosave
+cordova-cli config edit --> cordova config edit
--- End diff --
is tabbing of the arrows a little off here?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-cli pull request #267: CB: 11982 -Created new cordova config command
Posted by purplecabbage <gi...@git.apache.org>.
Github user purplecabbage commented on a diff in the pull request:
https://github.com/apache/cordova-cli/pull/267#discussion_r103999595
--- Diff: src/cli.js ---
@@ -160,7 +183,7 @@ module.exports = function (inputArgs, cb) {
};
function getSubCommand(args, cmd) {
- if(cmd === 'platform' || cmd === 'platforms' || cmd === 'plugin' || cmd === 'plugins' || cmd === 'telemetry') {
+ if(cmd === 'platform' || cmd === 'platforms' || cmd === 'plugin' || cmd === 'plugins' || cmd === 'telemetry' || cmd === 'config') {
--- End diff --
This is absolutely going to be a merge conflict with #270
https://github.com/apache/cordova-cli/pull/270/files#diff-d9d9214113dea1c364abd4ba3c70be11R317
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-cli pull request #267: CB: 11982 -Created new cordova config command
Posted by audreyso <gi...@git.apache.org>.
Github user audreyso commented on a diff in the pull request:
https://github.com/apache/cordova-cli/pull/267#discussion_r105446036
--- Diff: doc/cordova.txt ---
@@ -6,6 +6,7 @@ Global Commands
create ............................. Create a project
help ............................... Get help for a command
telemetry .......................... Turn telemetry collection on or off
+ config ............................. Store environment variables
--- End diff --
@stevengill Is this what you had in mind for cordova.txt? More details needed?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-cli pull request #267: CB: 11982 -Created new cordova config command
Posted by filmaj <gi...@git.apache.org>.
Github user filmaj commented on a diff in the pull request:
https://github.com/apache/cordova-cli/pull/267#discussion_r107737934
--- Diff: doc/config.txt ---
@@ -0,0 +1,22 @@
+Synopsis
+
+ cordova-cli config <command> [options]
+
+
+The config command can be used to set, get, delete, edit, and list the
+contents of the user files.
--- End diff --
"user files" here was confusing to me - it was unclear to me what that is.
Based on the [cordova-discuss proposal](https://github.com/cordova/cordova-discuss/pull/63/commits/788be4b3a2f360cdc2c5b4ddd46d7547a7f45416), we want to model this command after `npm config`, and its synopsis goes like this:
> npm-config - Manage the npm configuration files
`git config` serves a similar purpose, I think, and its synopsis is:
> git-config - Get and set repository or global options
One suggestion: "set, get, delete, edit, and list global cordova options" ?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-cli issue #267: CB: 11982 -Created new cordova config command
Posted by purplecabbage <gi...@git.apache.org>.
Github user purplecabbage commented on the issue:
https://github.com/apache/cordova-cli/pull/267
This PR will need to follow #270 and will need to be rebased, and have a conflict fix.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-cli pull request #267: CB: 11982 -Created new cordova config command
Posted by audreyso <gi...@git.apache.org>.
Github user audreyso closed the pull request at:
https://github.com/apache/cordova-cli/pull/267
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-cli pull request #267: CB: 11982 -Created new cordova config command
Posted by audreyso <gi...@git.apache.org>.
Github user audreyso commented on a diff in the pull request:
https://github.com/apache/cordova-cli/pull/267#discussion_r99413111
--- Diff: doc/config.txt ---
@@ -0,0 +1,20 @@
+Synopsis
+
+ cordova-cli config <command> [options]
+
+
+The config command can be used to set, get, delete, and edit the
+contents of the user files.
+
+Options
+--set <key> <value> .............................. Sets the config key to the value.If value is omitted, then it sets it to "true".
+--get <key> ...................................... Echo the config value to stdout.
+--delete <key> ................................... Deletes the key from all configuration files.
+--edit ........................................... Opens the config file in an editor.
+
+Example
+
+cordova-cli config set <key> <value> --> cordova config set autosave true
+cordova-cli config get <key> --> cordova config get autosave
+cordova-cli config delete <key> --> cordova config delete autosave
+cordova-cli config edit --> cordova config edit
--- End diff --
will need to add in "ls" command
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-cli pull request #267: CB: 11982 -Created new cordova config command
Posted by filmaj <gi...@git.apache.org>.
Github user filmaj commented on a diff in the pull request:
https://github.com/apache/cordova-cli/pull/267#discussion_r107738404
--- Diff: doc/cordova.txt ---
@@ -6,6 +6,8 @@ Global Commands
create ............................. Create a project
help ............................... Get help for a command
telemetry .......................... Turn telemetry collection on or off
+ config ............................. Store and retrieve environment variables
--- End diff --
Along the same lines as my previous comment, to me, environment variables means something other than program-specifc (i.e. cordova-specific) configurations. Whatever wording we choose for the synopsis, I would also update this portion to reflect that.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-cli issue #267: CB: 11982 -Created new cordova config command
Posted by stevengill <gi...@git.apache.org>.
Github user stevengill commented on the issue:
https://github.com/apache/cordova-cli/pull/267
this has been merged, can you close it @audreyso
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-cli pull request #267: CB: 11982 -Created new cordova config command
Posted by audreyso <gi...@git.apache.org>.
Github user audreyso commented on a diff in the pull request:
https://github.com/apache/cordova-cli/pull/267#discussion_r99413060
--- Diff: package.json ---
@@ -33,6 +33,7 @@
"configstore": "^2.1.0",
"cordova-common": "2.0.0",
"cordova-lib": "6.5.0",
+ "editor": "^1.0.0",
--- End diff --
will remove
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org