hygen-create
Version:
simplifies creation of hygen templates from existing projects
68 lines • 3.36 kB
JSON
{
"about this file": [
"This file is used by src/__integration_tests__/integration.test.ts",
"Each entry in here is an array of two strings.",
"The first string (<string1>) is intended to be the value input for the 'hygen-create usename <string1>' command",
"The second (<string2>) is the expected value after running the resulting generator with --name <string2>"
],
"about the sections": [
"Each section has a 'defs' entry with two definitions: 'hygen-create usename' and 'hygen --name",
"When the following command sequence is run:",
" $ hygen-create start test-generator",
" $ hygen-create usename <hygen-create-usename from the defs section>",
" $ hygen-create add test_strings.json",
" $ hygen-create generate",
" $ hygen test-generator new --name <hygen-name from the defs section>",
"The expected result in the created file:",
" The first string is expected to become identical to the second",
" The second string should remain as it was in the original file"
],
"plain": {
"defs": {
"hygen-create usename": "word",
"hygen --name": "result"
},
"comparisons": {
"plain": ["word", "result"],
"capitalized": ["Word", "Result"],
"allcaps": ["WORD", "RESULT"],
"with_preceding_underscore": ["_word", "_result"],
"with_preceding_underscore_capitalized": ["_Word", "_Result"],
"with_preceding_dash": ["-word", "-result"],
"with_preceding_dash_capitalized": ["-Word", "-Result"],
"with_preceding_word_capitalized": ["ClsWord","ClsWord", "not converted"]
}
},
"doubled-no-sfx": {
"defs": {
"hygen-create usename": "DoubleWord",
"hygen --name": "TheResult"
},
"comparisons": {
"underscore": ["double_word","the_result"],
"underscore_with_preceding_underscore": ["_double_word","_the_result"],
"camelcased": ["DoubleWord","TheResult"],
"camelcased_with_preceding_underscore": ["_DoubleWord", "_TheResult"],
"camelcased_lowerfirst": ["doubleWord", "theResult"],
"dashed": ["double-word", "the-result"],
"dashed_with_preceding_dash": ["-double-word", "-the-result"],
"underscore_all_caps": ["DOUBLE_WORD", "THE_RESULT"]
}
},
"doubled-with-sfx": {
"defs": {
"hygen-create usename": "DoubleWord",
"hygen --name": "TheResult"
},
"comparisons": {
"underscore": ["double_word_with_sfx","the_result_with_sfx"],
"underscore_with_preceding_underscore": ["_double_word_with_sfx","_the_result_with_sfx"],
"camelcased": ["DoubleWordWithSfx","TheResultWithSfx"],
"camelcased_with_preceding_underscore": ["_DoubleWordWithSfx","_TheResultWithSfx"],
"camelcased_lowerfirst": ["doubleWordWithSfx","theResultWithSfx"],
"dashed": ["double-word-with-sfx","the-result-with-sfx"],
"dashed_with_preceding_dash": ["-double-word-with-sfx","-the-result-with-sfx"],
"underscore_all_caps": ["DOUBLE_WORD_WITH_SFX","THE_RESULT_WITH_SFX"]
}
}
}