Easy UI5 3.5.0 – Now Available!
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!
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/
Below you can find the blog posts related to the evolution of Easy UI5:
- Easy UI5: Getting Started Even Easier by Peter Muessig (March 10th, 2022)
- Release of v3.2.0 of the easy-ui5 generator by Nicolai Geburek (February 10th, 2022)
- Easy-UI5 3.0 – From Community Contributions to Plugins by Marius Obert (April 9th, 2021)
- Introducing the easy-ui5 generator by Marius Obert (February 5th, 2019)
Update to the latest version doesn't works.
I made a typo in the instructions and fixed it just right now. You need to call:
Sorry, may bad!
THX for letting me know...
Now it works fine.
Would be nice if easy-ui5 could also directly pull the generators from Gitlab and even from private repositories.
Reason: I'm planning to write a generator for a customer project. The customer does not want the whole world to use their generator.
If I find time I might have a look at it and create a PR.
Robin Paneels opened an issue about this a while back already:
Pulling from Gitlab may be a bit more tricky with the usage of the Octokit API to determine the repositories, but for the BestOfUI5 or the direct pull from GH org and GH repo it may work since there it just calculates the URL and we just may add another base URL for it.
For private repos, this is already possible if you pass a GH auth token, e.g. as entries in your .npmrc file:
The addGhOrg can be passed as parameter or added in general to the .npmrc like above. But you can also combine this with the way to directly access a generator from your private repo. BTW: another benefit of the auth token is that you don't hit the "GitHub API limit" which is limiting the amount of anonymous requests.
If you want to contribute, I am more than happy - that would be awesome... 🙂
if it's already possible with private GH repos we might take that way. Have to discuss it with my team mates.
Thank you for the info.