-
Notifications
You must be signed in to change notification settings - Fork 18
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
Allow overriding or customizing the template files #111
Comments
Hey @scottanderson42, I agree, currently, the project generator is not customizable enough, let me research a little bit, look at how Nx does for their own generators, and discuss with you more about it. I agree that could be not productive if you write your generator trying to remove or modify the current generator, another suggestion might be a light version of the project generator that only generates a minimal number of files, in this way, it is easy to extend the Sounds good? |
Sounds good to me! |
Hey @scottanderson42 sorry for the delay, I finally had the time to raise the PR that implements a new project generator, more flexible, I also used your suggestion to have the PR: #123 It also fixes #117 because I'm not installing the |
🎉 This issue has been resolved in version 15.11.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
Allowing the generator files to be modified automatically to include or omit features.
Motivation
There are any number of customizations we'd like to make to the project generators, such as creating a SAM
template.yaml
, adding specific sections or configuration topyproject.toml
, adding or modifying tasks inproject.json
, and so on. We could create our own generator that calls the@nxlv
generator, but that seems wasteful and somewhat difficult if all we need to do is, for example, change the pytest configuration.Suggested Implementation
Passing in a simple
--template-files-dir
that overrides the location of the template files. Or somewhat more complicated, only overrides the files that are present in the additional directory. This would introduce a minimal maintenance burden.Alternate Implementations
There may be
nx
conventions for generators of which I am unaware, but some other approaches are:features
parameter to the generators that is used to toggle the presence of sections of the files or modify behavior, similar toaddDevDependencies
but generalized. Additional features would require code additions though.The text was updated successfully, but these errors were encountered: