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

Mechanism to get subgenerator name #1762

Open
adautomendes opened this issue May 10, 2022 · 0 comments
Open

Mechanism to get subgenerator name #1762

adautomendes opened this issue May 10, 2022 · 0 comments

Comments

@adautomendes
Copy link

I'm writing some subgenerators and one requirement is to rename the output files based on the subgenerator name, for instance:

generators
      |__ app
      |      |__ templates
      |                |__ myFile
      |__ gen1
      |      |__ templates
      |                |__ myFile
      |__ gen2
            |__ templates
                      |__ myFile

Considering here that 'app' is composed with 'gen1' and 'gen2'. So both will write at my output and I need something like that:

myFile.app
myFile.gen1
myFile.gen2

I know that generators can access 'appname' to get top-level generator name, but what about the subgenerator name? There is any way to get the subgenerator name programmatically at runtime?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant