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
feat(get-config): add support for defining plugins as an object #2154
base: master
Are you sure you want to change the base?
Conversation
This implementation allows the plugins to be defined as an object instead of an array. The benefit is readability and usability, especially when using yaml format, where empty objects can be left out. In Javascript, the benefit is more limited since it is necessary to put in the empty objects, but even then the configuration should be more intuitive. This is implemented in backwards compatible way, where the original format is still used internally, so nothing should break.
I'd usually start by creating an issue to have a discussion before sending a PR :) Can you update the docs to account for your change? That's the best starting point to have a discussion |
Yea, I'm way too used to thinking through PoCs so, this kinda just happened ^^;
Will do. I'll update them later today after work. |
…ugin object format
…S locale Added tests to check different situations that the normalization function could in the worst case encounter. Also added LANG=en_US.UTF-8 in front of the test scripts to guarantee that the tests are run using English language locally. Without the variable, yargs will use whatever is set to LANG and some tests will fail.
@gr2m I added some tests and documentation + examples for the new feature. There was an problem with the tests, where some of the |
This implementation allows the plugins to be defined as an object instead of an array. The benefit
is readability and usability, especially when using yaml format, where empty objects can be left
out. In Javascript, the benefit is more limited since it is necessary to put in the empty objects,
but even then the configuration should be more intuitive. This is implemented in backwards
compatible way, where the original format is still used internally, so nothing should break.