New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: add config command #629

Closed
jwx opened this Issue May 12, 2017 · 0 comments

Comments

Projects
None yet
2 participants
@jwx
Contributor

jwx commented May 12, 2017

I'm submitting a feature request

Current behavior:
The CLI doesn't have an easy way to modify the project configuration.

Desired behavior:
I've created a CLI command according to the following:


au config <key> <value> --get --set --clear --add --remove --no-save --no-backup

Gets or sets configuration for the Aurelia application.

key (optional) - The key you want to get or set. Supports hierarchies and array indexes, for example build.targets[0] and arrayWithArray[2].[1]

value (optional) - The value you want to set the key to. Supports json, for example "{ \"myKey\": \"myValue\" }"

--get - Gets the content of key, ignoring value parameter (the same as not specifying a value).

--set - Sets the content of key to value, replacing any existing content.

--clear - Deletes the key and all its content from the configuration.

--add - If value or existing content of the key is an array, adds value(s) to existing content. If value is an object, merges it into
existing content of key.

--remove - If value or existing content of the key is an array, removes value(s) from existing content. If value or existing content of the
key is an object, removes key(s) from existing content of key.

--no-save - Don't save the changes.

--no-backup - Don't create a backup configuration file before saving changes.

If this is interesting I could easily make a PR.

  • What is the motivation / use case for changing the behavior?

Not having a command to use for configuration changes makes scripting (as well as tutorials) more complicated than it has to be.

jwx added a commit to jwx/cli that referenced this issue Jun 14, 2017

feat(cli): add `au config` command
The `au config` command gets or sets configuration for the Aurelia application.
`au config <key> <value> --get --set --clear --add --remove --no-save --no-backup`

Closes aurelia#629.

jwx added a commit to jwx/cli that referenced this issue Oct 5, 2017

feat(cli): add `au config` command
The `au config` command gets or sets configuration for the Aurelia application.
`au config <key> <value> --get --set --clear --add --remove --no-save --no-backup`

Closes aurelia#629.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment