-
Notifications
You must be signed in to change notification settings - Fork 7
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
Figure out how to handle custom generators #148
Comments
Here are the use cases I've seen for custom generators and the issues that currently exist: In each of these, "templates" refers the EJS Templates used by the yeoman generators inside generator-donejs. 1 - Plugins can modify templates used by other plugins (#140 - docs)Example Use Case:I want to create a component that uses mocha for its tests by running these commands:
Proposed Solution:This works currently.
2 - Plugins can rename templates used by other plugins (#141)Example Use Case:I want to create a component that uses SASS for its styles by running these commands:
Proposed Solution (1a):Generators will store a list of the templates they use in the
that would contain this list. Proposed Solution (1b):Generators will read the list of files in the template directory and copy them all over. Issues with solution:
3 - Two plugins can modify the same templateExample Use Case (3a):I want to create a component that uses mocha and CommonJS by running the commands
Proposed Solution (3a):Create utilities for plugins to modify existing plugins using transforms (using something like jscodeshift for JS files). The
Issues with solution (3a):
Example Use Case (3b):I want to create a component that uses mocha and CommonJS by running the commands
Proposed Solution (3b):Create plugins for all of the combinations of technologies.
Issues with solution (3b):
|
maybe this should use codemods now as thats used now via can-migrate proposed changes to other generators already not finished with all existing generators but i think that would clear also that |
@frank-dspeed 3a talks about using codemods. jscodeshift is what can-migrate uses for running codemods. |
Before we announce how custom generators work, we should review what we've done.
The text was updated successfully, but these errors were encountered: