valueTransform documentation about built-in transformers missing, is generator = casing the new suggestion? #7319
Unanswered
rklec
asked this question in
Template authoring
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have saved a reference to https://github.com/dotnet/templating/wiki/Available-Symbols-Generators as the go-to doc for this use case and have this
.template.config/template.json
:This works due to built-in
valueTransform
'ers and IMHO this is great.Now I wanted to add a simple "all lowercase" transformation (and replacement symbol), and I thought of something like this:
The thing is I did not find many docs about the built-in generators of
valueTransform
.Yes, https://github.com/dotnet/templating/blob/e393fd55ffb542ec07f6e29fc52ebca7479312c2/docs/Reference-for-template.json.md explains you can write your own transformator then, but where is the list of built-in ones?
Also I now see https://github.com/dotnet/templating/wiki/Available-Symbols-Generators recommends a generator instead of derived stuff for lowercasing. I guess it would apply like this:
I now wonder. Why this way then? Is this the new way?
Is
valueTransform
deprecated or so and should I use"generator": "casing"
instead?PS: A solution to this could also be to have a JSON schema, where I have autocompletion for
valueTransform
, so I can very easily get the available values.Beta Was this translation helpful? Give feedback.
All reactions