T4MVC / R4MVC

R4MVC is a Roslyn code generator for ASP.NET Core MVC apps that creates strongly typed helpers that eliminate the use of literal strings in many places
Apache License 2.0
157 stars 48 forks source link

Tool command: Generate #61

Closed artiomchi closed 6 years ago

artiomchi commented 7 years ago

This is the main command of the package, which runs the primary purpose of the tool - evaluating the web project and generating R4Mvc classes. It can be either invoked in PowerShell (Generate-R4Mvc) or in dotnet cli (dotnet r4mvc generate). If executed within the same path as the web project, it can be triggered as is, otherwise you need to pass the project path as an argument.

Thanks to the dotnet configuration extensions, the main configuration will be picked up from the r4mvc.json file in the root of the web project. Alternatively, you can also pass arguments in the command line to the tool (documentation will follow). I think it would be great if we also stored the configuration parameters in the json file if they haven't already been stored there to ensure that each consecutive run on the tool will generate consistent results.

Tasks: