Open richardszalay opened 5 years ago
(Since you're effectively using a custom vstemplate format, it would also be nice to support conditionally including projects or excluding files - but that wouldn't necessarily be part of this initial PR)
I have made something slightly different that was faster to implement. It might serve the same purpose - to some degree at least. On paths in the manifest you can now add a "condition" which in first release just support a boolean string, and not operator ! (ex. <ignorePath><folder path="/$layername$/$moduleName$/serialization" condition="!$IncludeSerializationFolder$" />...
For now it ootb just works with the value of a input="checkbox" token. Then part of the template content can be ignored if a checkbox is checked/not checked.
You can write your own conditions that extend IEvaluateCondition and then add a type="YourStuff.Namespace.CrazyExpressionValidator, YourStuff" to the file or folder element in <ignorePaths>
(previously <ignoreFiles>
)<skipPaths>
and projectsToAttach
.
For later, I have been considering to extend the dotnetnew templateengine but lack the time to get started on this. This would enable support for all the VS templating plus still keep all the added goodness and structure from having the manifest files etc etc. Perhaps sometime later in the year..
Visual Studio's templating engine supports
$if$
conditionals in its files so it would be good to support them here. Is this something you'd be happy to accept a PR for?