You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the suggestion, it sounds like a great idea!
To be clear, how would you envision editing the templates? For example, with the scaffold, multiple templates are involved. Would you expect to customize just one template, or would you need to modify all of them?
How would you expect the CLI flags to behave when specifying custom templates?
I expect this behavior to work like this.
Developers have their own templates in their repositories or in different directories on their local machines.
There is a global config, or a local one for a specific project, that includes the path to the templates. They can also pass an argument through the CLI.
When they generate something, loco-rs uses the developer's templates.
We can also create custom starters, following the same idea.
I think a single template configuration should be enough. The priority of configurations is as follows: CLI argument -> local -> global. I’m not entirely sure about the local and global configurations; maybe they will work through environment variables or a configuration file.
Most likely, users will provide the same files and structure as in the loco-rs repository, and if certain files are missing, loco-rs will use the default templates.
Description
I think it would be a good idea if we could use our own templates instead of ones like this
loco/src/gen/scaffold.rs
Line 12 in e544fa4
Expected Behavior
Developers can configure their own templates in their applications. By default, it will work as it does now.
The text was updated successfully, but these errors were encountered: