Skip to content

Command: vue config implemented #1554

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

Merged
merged 14 commits into from
Jul 11, 2018
Merged

Command: vue config implemented #1554

merged 14 commits into from
Jul 11, 2018

Conversation

pburdette
Copy link
Contributor

I've wrapped up the new vue config command.

Takeway:

If there is a better way to do a conditional check to only print the config and resolved path when vue config is invoked let me know.

Out of the box Commander doesn't support options with multiple values. My work around for the vue config -s <path> <value> command was to pass an optional argument to the command and do a conditional check if present.

I added the dependency opn for opening the config file with vue config -e if there is a shared utility for this I couldn't track it down.

Hope everything looks good!

Copy link
Member

@yyx990803 yyx990803 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! A few things:

  1. The ~/.vuerc file is a config file that may contain presets, it is not the preset itself. The command descriptions and logs need to adjusted.

  2. The implementation currently does not handle nested paths. You will need packages like https://github.com/jonschlinkert/get-value to handle nested paths.

@pburdette
Copy link
Contributor Author

@yyx990803 thanks for the feedback. Can you provide me an example of proposed wording for one of the commands?

@yyx990803
Copy link
Member

yyx990803 commented Jun 13, 2018

Just replacing preset with config option should be good for now.

@pburdette
Copy link
Contributor Author

@yyx990803 Changes made and pushed.

Nested path support implemented with dependencies
get-value
unset-value
set-value

commands/logs updated

@sqal
Copy link

sqal commented Jun 13, 2018

@beardedpayton

Nested path support implemented with dependencies
get-value
unset-value
set-value

Wouldn't be better to just use one dependency for this case? I am thinking https://github.com/sindresorhus/dot-prop

@pburdette
Copy link
Contributor Author

@yyx990803 Do the changes look good to be merged? Or does this PR need more work?

@pburdette pburdette mentioned this pull request Jun 29, 2018
.description('inspect and modify the config')
.option('-g, --get <path>', 'get value from preset')
.option('-s, --set <path> <value>', 'set preset value')
.option('-d, --delete <path>', 'delete preset from config')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are still using the word preset in here and above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pksunkara whoops, thanks for that. Just made the changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants