-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
More control over created brick contents #516
Comments
Even if this is some ways off, a couple of changes should be made sooner:
I've submitted PRs for both of these. |
Weird, I thought I'd written a complete proposal of the template structure but I can't find it, so I'll add it again. I'm proposing a structure like the following:
If The defaults would be in Polylith's |
I don't think it's worth templating the Calva settings but I'm open to being persuaded...? |
I can work up a PR with docs for this new feature -- organizationally, where would you like this added in the documentation? |
From Joakim: You can put it after Libraries (before Configuration). I don't know what the best name is, but maybe Templating or something (you may have a better suggestion!). In the Creating a component section, it could be helpful if we link to this (e.g.) Templating section, mentioning that the content of the files are configurable. (and this may need to change once dialects are supported -- that needs some discussion because if you change the structure in a breaking way, anyone with existing overriding templates will have their local config broken) |
Signed-off-by: Sean Corfield <[email protected]>
Signed-off-by: Sean Corfield <[email protected]>
At this point, is there any additional work needed for this issue? |
No, nothing that I'm aware of. |
Is your feature request related to a problem? Please describe.
I would like to be able to control the contents of newly-created bricks.
Specifically:
resources
(I very rarely need this, and I don't like it being created by default -- and the.keep
file should probably be inresources/<brick-name>/
instead of justresources
)src
/test
files (e.g., a copyright message)test
files and a different default testing libraryDescribe the solution you'd like
Ideally, use Selmer templates for various files that need to be created, with a way for users to provide their own on a global or per-workspace basis.
Provide a way to configure (in
workspace.edn
and via the CLI) additional/overriding "variables" to be substituted into these templates.Perhaps, when a workspace is created, Polylith could copy its default templates (or a user's global overrides?) into a folder, and those templates would be used for any brick creation from then on, simplifying any customization process?
The text was updated successfully, but these errors were encountered: