Templating: Add support for fileRename to Generated Parameters

Created on 22 Jan 2020  路  4Comments  路  Source: dotnet/templating

According to the wiki, it appears that you can use fileRename with any symbol type (parameter, computed, generated), but it only works with parameter. We have some templates that we would like to generated symbols (using casing and/or regex generators), but have to supply an additional command line parameter. If this is something that is too difficult to support or not high on the list of priorities, it would be good to update the wiki for anyone else that might run into this issue.

1.5 triaged

All 4 comments

  1. Adding item to specific project corresponding to a targeted delivery area
  2. Once this has been done for the entire backlog, the next steps will be to prioritize within each project & output a delivery roadmap.
  3. At that point, the issues will be assigned to a corresponding milestone
  4. The team will then begin to deliver against the road map, contributions always welcome

I have just come to the exact same conclusion. This makes it quite difficult to do any templates involving angular. The code there uses Kebab case for file names, but Pascal and/or Camel case for symbols. I can generate the Kebab replacement symbol with the regex generator but there is no way I can use it to replace a file name.

Would it be possible to do the same RegEx in the forms section and apply it to the parameter symbol? There appears to RegEx replace and chain as an available form but I am not finding any examples on how to use it.

@krjone01 & @divinebovine (great name by the way!), We are currently working on updating documentation, so this issues nicely falls into our current game plan.

@grinrag greetings. Heads up, I've moved this item to the top of our backlog. Let's talk about it on Monday to plan it for the week. Let's time box 1.5 days for this & discuss where we're at then.

I have corrected Reference for template.json wikipage.
Support for fileRename for symbols with type=generated is split to https://github.com/dotnet/templating/issues/2507

Was this page helpful?
0 / 5 - 0 ratings