-
-
Notifications
You must be signed in to change notification settings - Fork 297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom templates #822
Comments
Hey @daxartio, 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. 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. |
#1052 creates a clear folder structure that we can later "overlay" a custom folder structure on |
@daxartio my thoughts are these, highlighting the freedoms/limitations
suggestions 3.a) name for the flag:
3.b) ways to make sure a user knows a custom template is used:
|
Many thanks |
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: