Add projectspecific files based on directory #140
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the Change
This change addresses a few issues I had with the generator. I realize that there is another pending pull request that adresses part of the Problem, but I believe this solution is more customizeable. I had most of the implementation finished before I saw this request, so I thought it's worth to give it a shot:
1. Make more use of the helix-template folder in the project
With this change the helix generator makes more use of the
helix-template
folder in the solution.This means, that every file and every folder that is contained in the
helix-template
folder will be copied to thecode
folder of the module which is being created. While copying the structure of thehelix-template
folder, the substings_Layer
,_Module
and_Vendor
in filenames and folder names will be replaced by the current values.2. Build config generation in .csproj file can be deactivated
I added the option to not generate build configurations in the
.csproj
file. There is an additional question if build configurations should be generated on script start which controls this. This is useful if there are specific needs to the build configurations which aren't handled by the generator yet. To use this correctly the build configurations should be provided by the.csproj
templates.3. Bugfix
In addition to the above features, I fixed a bug, that could cause a broken solution file. This bug occurred when there were Modules in the solution that contained the name of a Layer, but were not the Layer folder.
For example a solution that had a module which is called
FeatureList
would cause the created project to have two parent items in the nested projects section, theFeatureList
and the Layer folder itself.So in the solution file there would be an assignment like this:
To fix this, I changed the generator to only pick the first object that is found with the @like@ operation. So if a solution does have this problem it can be resolved by moving the layer folders to the top of the project definitions in the.sln file.
Benefits
helix-template
folder is set up correct.Possible Drawbacks
helix-template
folder of the solution might break the solution