You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introduce a --casing flag to the ExportCommand in the Configu CLI, enabling users to adjust the casing convention of configuration keys in the export results. The flag is optional and accepts various casing options, all presented in pascalCase:
CamelCase: Transforms keys to twoWords
CapitalCase: Transforms keys to Two Words
ConstantCase: Transforms keys to TWO_WORDS
DotCase: Transforms keys to two.words
KebabCase: Transforms keys to two-words
NoCase: Transforms keys to two words
PascalCase: Transforms keys to TwoWords
PascalSnakeCase: Transforms keys to Two_Words
PathCase: Transforms keys to two/words
SentenceCase: Transforms keys to Two words
SnakeCase: Transforms keys to two_words
TrainCase: Transforms keys to Two-Words
Each option will transform the casing of config keys in the output according to the selected style.
In the above command, if a Config Key is named databaseURL, applying the --casing "snakeCase" flag will transform it to database_url in the export result. This feature caters to developers and systems requiring specific key formatting, such as environment variables in UNIX systems which commonly use UPPER_SNAKE_CASE, or JavaScript projects that prefer camelCase for object keys.
This addition will not only streamline the configuration management process but also reduce manual post-processing efforts, making Configu an even more powerful tool in the hands of developers.
Motivation
Offering the --casing option empowers developers to tailor the format of config keys to align with project standards or the requirements of different deployment targets. This capability simplifies configuration management and deployment processes, especially when working across diverse platforms.
Context
The change-case library, a part of the project's dependencies, provides the functionality necessary for implementing the casing transformations. https://www.npmjs.com/package/change-case
casing: Flags.string({description: `Transforms the casing of Config Keys in the export result to camelCase, PascalCase, Capital Case, snake_case, param-case, CONSTANT_CASE and others`,}),
The text was updated successfully, but these errors were encountered:
Suggestion
Introduce a
--casing
flag to theExportCommand
in the Configu CLI, enabling users to adjust the casing convention of configuration keys in the export results. The flag is optional and accepts various casing options, all presented inpascalCase
:CamelCase
: Transforms keys totwoWords
CapitalCase
: Transforms keys toTwo Words
ConstantCase
: Transforms keys toTWO_WORDS
DotCase
: Transforms keys totwo.words
KebabCase
: Transforms keys totwo-words
NoCase
: Transforms keys totwo words
PascalCase
: Transforms keys toTwoWords
PascalSnakeCase
: Transforms keys toTwo_Words
PathCase
: Transforms keys totwo/words
SentenceCase
: Transforms keys toTwo words
SnakeCase
: Transforms keys totwo_words
TrainCase
: Transforms keys toTwo-Words
Each option will transform the casing of config keys in the output according to the selected style.
Example Usage:
In the above command, if a Config Key is named
databaseURL
, applying the--casing "snakeCase"
flag will transform it todatabase_url
in the export result. This feature caters to developers and systems requiring specific key formatting, such as environment variables in UNIX systems which commonly useUPPER_SNAKE_CASE
, or JavaScript projects that prefercamelCase
for object keys.This addition will not only streamline the configuration management process but also reduce manual post-processing efforts, making Configu an even more powerful tool in the hands of developers.
Motivation
Offering the
--casing
option empowers developers to tailor the format of config keys to align with project standards or the requirements of different deployment targets. This capability simplifies configuration management and deployment processes, especially when working across diverse platforms.Context
The
change-case
library, a part of the project's dependencies, provides the functionality necessary for implementing the casing transformations.https://www.npmjs.com/package/change-case
The text was updated successfully, but these errors were encountered: