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: 
pmuessig
Advisor
Advisor


 

Easy UI5 is the tool of choice of UI5 developers to kick-start UI5 freestyle projects. The plugin generators (or sub-generators) listed in Easy UI5 are provided by the UI5 community and the UI5 team and include the latest best practises and features. As of today, all plugin generators are from the ui5-community GitHub organisation. Last week a new version of Easy UI5 has been released which is 3.5.0 and comes with several new features:

  • Offline support

  • Forced updated of generators

  • Generators from GH repository

  • Best Of UI5 integration


To use the latest features, please make sure to use the latest version of Easy UI5:
# Upgrade Easy UI5 to latest version
npm install -g generator-easy-ui5

# Check the latest version >= 3.5.0
npm info generator-easy-ui5 version

Now you are prepared to checkout the latest features of Easy UI5!

 

Offline Support


As Easy UI5 is consuming the generators from the ui5-community GitHub organisation it uses the Octokit REST API to list the available plugin generators. Once you are offline, Easy UI5 stops working. Therefore, the offline support has been added which just uses the locally installed plugin generators:
# Run Easy UI5 in offline mode
yo easy-ui5 --offline

Now, Easy UI5 doesn't require an Internet connection to run.

 

Forced Update of Plugin Generators


In some circumstances, a plugin generator may be corrupt. Therefore, Easy UI5 provides the option to force the update of a plugin generator:
# Force update of plugin generator
yo easy-ui5 [plugin-generator] --forceUpdate

With the option --forceUpdate the plugin-generator will be downloaded again and the local copy will be replaced ignoring the up-to-date check.

 

Generators from arbitrary GitHub repository


To support using special generators for hands-on sessions, it is now possible to point directly to GitHub repositories to use a plugin generator from there:
# Use a plugin generator from a GitHub repository
yo easy-ui5 SAP-samples/ui5-typescript-tutorial

The command requires the GitHub user/org and the repository name. The generator by default resides in the "/generator" subfolder. In the UI5 TypeScript tutorial repository mentioned above, the generator resides in a separate test folder: https://github.com/SAP-samples/ui5-typescript-tutorial/tree/main/generator.

But besides just specifying the GitHub user/org and repository, Easy UI5 allows to also specify a subfolder and a branch:
# Usage example:
yo easy-ui5 %GH_USER/ORG% / %GH_REPO% [!/ %REPO_PATH% ] [# %BRANCH%]
>> yo easy-ui5 SAP-samples/ui5-typescript-tutorial!/generator#main

The subfolder inside the GitHub repository is separated by "!/" and the branch is separated by "#".

An example for pointing to a concrete generator in the root folder can be seen in the following:
# Consume generator from your user
yo easy-ui5 petermuessig/generator-ui5-ts-app!/

Hint: The exclamation mark needs to be escaped in the command line. You may need to add a backslash to escape: yo easy-ui5 petermuessig/generator-ui5-ts-app\!/

 

Best Of UI5 Integration


With Easy UI5 3.5.0, a feature preview has been added to consume the plugin generators from bestofui5.org. Just adding the argument "--next" makes Easy UI5 to query bestofui5.org for available generators:
# Consume plugin generators from bestofui5.org
yo easy-ui5 --next

Looking forward, with Easy UI5 4.0.0 using bestofui5.org as a source for the plugin generators will become the default! Then there is no need anymore to add a generator to the ui5-community GitHub organisation and it is just necessary to register your plugin generator to bestofui5.org!

Learn more about Best of UI5 here: https://blogs.sap.com/2022/05/23/best-of-ui5-the-best-place-to-find-packages-for-the-ui5-ecosystem/

 

Related Links


Below you can find the blog posts related to the evolution of Easy UI5:

 
6 Comments