Skip to content

[Feature Request] add an option to specify templates' location #606

@badersur

Description

@badersur

The scaffolding tool is great but it's tied to use bootstrap 3 and tweaking generated files for every project is annoying and time consuming! It would be nice to be able to pass a template's folder and the engine looks for templates inside it and use whatever available and use the current default template's path as a last resort!

I would love to provide the path and have the engine to look for templates as follows:

  1. use the provided path to look for the full template name (i.e. 2.0.0/Templates/ViewGenerator/... as used inside ~/.nuget)
  2. look for the file name only (for convenience and it's easier to create)
  3. read appsettings.*.json to know the template's folder (if I didn't provide a path)
  4. read some configuration file about custom template's folder (eg. ~/.aspcoreconfig?)
  5. use the default location

I'm thinking about a similar approach for dotnet new to provide a different _layout.cshtml that uses bootstrap 4 or any other framework!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions