Generator which use the official UI5 tooling and support multiple deployment targets such as the SAP Business Technology Platform. This generator was build as a plug-in for the community project Easy-UI5 by SAP.
$> npm i -g yo
$> yo easy-ui5 project
_-----_
| | ╭──────────────────────────╮
|--(o)--| │ Welcome to the easy-ui5 │
`---------´ │ generator! │
( _´U`_ ) ╰──────────────────────────╯
/___A___\ /
| ~ |
__'.___.'__
´ ` |° ´ Y `
Run you can use npm start
(or yarn start
) to start the local server for development.
Note the different greeting when the generator starts.
$> npm i -g yo
$> yo ./generator-ui5-project
_-----_ ╭──────────────────────────╮
| | │ Welcome to the │
|--(o)--| │ easy-ui5-project │
`---------´ │ generator! │
( _´U`_ ) ╰──────────────────────────╯
/___A___\ /
| ~ |
__'.___.'__
´ ` |° ´ Y `
During the prompting phase, the generator will ask on which target platform your app should run. Currently, the following options are available:
This is the most basic option. Choose this option if you want to deploy the web app in your custom environment or host it on an arbitrary server.
This is the most basic way to deploy the web app in Cloud Foundry-based environments. Besides the basic UI5 project, the generator will add an Approuter node.js-module that serves the web app.
This is the standard way to deploy the web app in SAP HANA XSA-based environments. Besides the basic UI5 project, the generator will add an Approuter node.js-module that serves the web app.
This option is a more sophisticate way to serve the web app from Cloud Foundry-based environments. The generator will include all modules that are included in the Application Router @ Cloud Foundry and, additionally, install a module to upload the web app to the HTML5 application repository during deploy-time. You can watch this presentation to learn more about the benefits of using the HTML5 application repository.
Use this option if you would like to develop a Fiori Launchpad application that should run on Cloud Foundry. The generator will include all modules that are included in the SAP HTML5 Application Repository service for SAP BTP and, additionally, install a module that adds Fiori Launchpad resources to the HTML5 application repository.
Use this option if you want to deploy your application(s) to the SAP NetWeaver ABAP Repository.
This sub-generator will create a new view (of the same type you specified during the creating of your project) and a new controller and route. If you have OPA5 tests, you can add a corresponding page object now or later with another sub-generator.
yo easy-ui5 project newview
Run the following command from your project's root to scaffold a custom control.
yo easy-ui5 project newcontrol
This sub-generator will create a new model in your manifest. Currently, JSON and OData v2 models are supported with various configuration options.
yo easy-ui5 project newmodel
This sub-generator will add a new component usage for component reuse to your manifest.
yo easy-ui5 project newcomponentusage
This sub-generator will add a basic OPA5 test setup. You can add page objects now or later with another sub-generator.
yo easy-ui5 project opa5
This sub-generator will create an OPA5 page object and add it to your journeys:
yo easy-ui5 project newopa5po
This sub-generator will create an OPA5 journey and add it to your test page:
yo easy-ui5 project newopa5journey
This sub-generator will add a basic QUnit setup. It will ask you for your app name and namespace if it is not yet part of an easy-ui5 project. You can add QUnit tests now or later with the newqunittest
sub-generator.
yo easy-ui5 project qunit
This sub-generator will create a new QUnit test either in a basic setup or with Sinon.JS to create standalone test spies, stubs and mocks in your QUnit tests:
yo easy-ui5 project newqunittest
This sub-generator will add a basic UIVeri5 test. It will ask you for test configuration and names of the suite and spec. You can add page objects now or later with another sub-generator.
yo easy-ui5 project uiveri5
This sub-generator will create a UIVeri5 page object and a new test that shows how to use the page object:
yo easy-ui5 project newuiveri5po
This sub-generator will create a UIVeri5 spec file:
yo easy-ui5 project newuiveri5spec
Depending on your target platform you'll need to install additional tools:
Required tools:
- Create a free account on SAP BTP Trial
- Install the Cloud Foundry Command Line Interface
cf login
- Install the MultiApps CF CLI Plugin
Deployment steps:
Call this command from the root directory to deploy the application to Cloud Foundry
npm run deploy
Required tools:
- SAP HANA or create a free SAP HANA Express system
- Install the XS CLI Client
xs login
Deployment steps:
Call this command from the root directory to deploy the application to HANA XSA
npm run deploy
Deployment steps:
Update the ui5.yaml file with your system settings (user, password & server) and ABAP repository settings (package, BSP Container & Transport). Run following command to deploy the application to SAP NetWeaver
npm run deploy
This project leverages (among others) the following Open Source projects:
Please use the GitHub bug tracking system to post questions, bug reports or to create pull requests.
We welcome any type of contribution (code contributions, pull requests, issues) to this generator equally.