Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
nicoschoenteich
Developer Advocate
Developer Advocate

The easy-ui5 generator recently saw a new minor release with version 3.2.0 (CHANGELOG).






Next to a few fixes and updated dependencies, one of the highlights is the support of subgenerators that live in repositories of other GitHub organizations or users. This means you can develop and use your own subgenerator and combine it with yo easy-ui5. You can configure this via the command line option --addGhOrg or via the npm config file. Let's look into this feature in more detail.






Add subgenerators from other GitHub orgs or users



The easy-ui5 generator usually looks for repositories in the ui5-community GitHub org and fetches them on demand. But let's say you or your organization have developed your own generator that fulfils special requirements and lives in another GitHub org or user account. In that case you can use the command line option --addGhOrg to include these repositories. The dialog will then display the org or user account the generator lives in [in brackets].





Prerequisites:


  • The repository is public (or you provide your auth token via --ghAuthToken to access your private repositories)

  • The repository name has "generator-" as prefix (or any other prefix you specify with --addSubGeneratorPrefix)


 
yo easy-ui5 --addGhOrg nicogeburek



Notice how my fork of the easy-ui5 generator, which lives in my personal GitHub account, is now also available as a generator.











You can also add a GitHub org or user by configuring your local npm config file. This has the same effect as setting the command line option with every command:




npm config set easy-ui5_addGhOrg=nicogeburek

 



A special thanks to @marcelschork, who suggested and also helped implement this feature (BTW: Any contribution to easy-ui5 or one of the subgenerators is always welcome).

Looking forward to your feedback!


3 Comments