Skip to content
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

How do I add a generator? #3

Closed
purplecabbage opened this issue Jan 8, 2020 · 3 comments
Closed

How do I add a generator? #3

purplecabbage opened this issue Jan 8, 2020 · 3 comments
Labels
documentation Improvements or additions to documentation

Comments

@purplecabbage
Copy link
Member

The directory structure is not obvious, so we need some documentation in the README about how to add a new generator so that it will be picked up by aio-cli-plugin-app init without any need to re-pub aio-cli-plugin-app.

@moritzraho
Copy link
Member

Thanks for the comment

@purplecabbage see the PR in aio-cli-plugin-app: adobe/aio-cli-plugin-app#113

There is no need to republish the aio-cli-plugin-app, the only generator that init needs to know about is app which is loaded by default by yeoman when doing register/require (see https://github.com/adobe/aio-cli-plugin-app/pull/113/files#diff-f3f6f06974db8060723f7350db40817dR36)

The app generator (https://github.com/adobe/generator-aio-app/blob/master/generators/app/index.js) then calls the add-action and add-web-assets generators internally. Those two generators call actual code generators for actions and web-assets. This means that actual code generators for ui and actions do not need to be known by aio-cli-plugin-app, but instead generator-aio-app will prompt the user for which action/ui to generate.

New action/ui generator can be added to generator-aio-app in the generators/add-action/xyz/ or generators/add-web-assets/xyz/ folder.
I will add some doc to it.

@moritzraho moritzraho added the documentation Improvements or additions to documentation label Jan 8, 2020
@moritzraho
Copy link
Member

Also in this PR I am adding your exc-shell generator as a new UI generator
#4

@moritzraho
Copy link
Member

fixed in #5

purplecabbage pushed a commit to purplecabbage/generator-aio-app that referenced this issue May 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants