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

Load settings from r4mvc.json file #35

Closed kevinkuszyk closed 9 years ago

kevinkuszyk commented 9 years ago

As per discussion in #20, I've added an r4mvc.json settings file, and implemented the first setting for the MVC helpers prefix.

@wwwlicious - what are your thoughts on this approach?

wwwlicious commented 9 years ago

looks good, what other settings do we need in the config files?

haven't had a chance to do much in the last couple of weeks but will hopefully get some more commits done this weekend for the views.

kevinkuszyk commented 9 years ago

Having given this some more thought, I think an ISettings which we can pass in would work better than lots of args and extension methods to get the settings.

The full list of settings from T4MVC is here. The ones that immediately stand out are:

  1. T4MVCNamespace
  2. LinksNamespace
  3. StaticFilesFolders
  4. ExcludedStaticFileExtensions
  5. ExcludedViewExtensions

I'll implement these. Let me know if there are any more you think we need up front and I'll add those too.

kevinkuszyk commented 9 years ago

I have added as many as I can for now. At the moment the configuration sub subsystem doesn't support arrays. When it does we can add the remaining settings.