generator-easy-ui5 2.4.6 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/README.md +66 -168
- package/generators/app/index.js +392 -171
- package/generators/app/postinstall.js +121 -0
- package/package.json +23 -18
- package/generators/additionalmodules/index.js +0 -222
- package/generators/additionalmodules/templates/approuter/package.json +0 -13
- package/generators/additionalmodules/templates/deployer/readme.md +0 -3
- package/generators/additionalmodules/templates/xs-security.json +0 -20
- package/generators/app/templates/_.editorconfig +0 -8
- package/generators/app/templates/_.eslintignore +0 -4
- package/generators/app/templates/_.eslintrc +0 -48
- package/generators/app/templates/_.gitignore +0 -11
- package/generators/app/templates/karma-ci.conf.js +0 -21
- package/generators/app/templates/karma.conf.js +0 -17
- package/generators/app/templates/readme.md +0 -6
- package/generators/newcomponent/index.js +0 -82
- package/generators/newcontrol/index.js +0 -81
- package/generators/newcontrol/templates/webapp/control/template.js +0 -23
- package/generators/newmodel/index.js +0 -142
- package/generators/newopa5journey/index.js +0 -99
- package/generators/newopa5journey/templates/test/integration/$journey.js +0 -23
- package/generators/newopa5po/index.js +0 -107
- package/generators/newopa5po/templates/test/integration/pages/$poFile.js +0 -43
- package/generators/newuiveri5po/index.js +0 -84
- package/generators/newuiveri5po/templates/pages/$poFile.js +0 -20
- package/generators/newuiveri5spec/index.js +0 -51
- package/generators/newuiveri5spec/templates/$specName.spec.js +0 -22
- package/generators/newview/index.js +0 -156
- package/generators/newview/templates/webapp/controller/$ViewName.controller.js +0 -7
- package/generators/newview/templates/webapp/view/$ViewName.view.$ViewEnding +0 -51
- package/generators/newwebapp/index.js +0 -239
- package/generators/newwebapp/templates/uimodule/ui5.yaml +0 -73
- package/generators/newwebapp/templates/uimodule/webapp/Component.js +0 -30
- package/generators/newwebapp/templates/uimodule/webapp/controller/BaseController.js +0 -70
- package/generators/newwebapp/templates/uimodule/webapp/css/style.css +0 -1
- package/generators/newwebapp/templates/uimodule/webapp/flpSandbox.html +0 -66
- package/generators/newwebapp/templates/uimodule/webapp/i18n/i18n.properties +0 -3
- package/generators/newwebapp/templates/uimodule/webapp/i18n/i18n_en.properties +0 -3
- package/generators/newwebapp/templates/uimodule/webapp/index.html +0 -29
- package/generators/newwebapp/templates/uimodule/webapp/manifest.json +0 -92
- package/generators/newwebapp/templates/uimodule/webapp/model/formatter.js +0 -4
- package/generators/newwebapp/templates/uimodule/webapp/model/models.js +0 -14
- package/generators/newwebapp/templates/uimodule/webapp/resources/img/favicon.ico +0 -0
- package/generators/newwebapp/templates/uimodule/webapp/xs-app.json +0 -11
- package/generators/opa5/index.js +0 -114
- package/generators/opa5/templates/test/integration/AllJourneys.js +0 -13
- package/generators/opa5/templates/test/integration/arrangements/Startup.js +0 -19
- package/generators/opa5/templates/test/integration/opaTests.qunit.html +0 -32
- package/generators/opa5/templates/test/integration/opaTests.qunit.js +0 -13
- package/generators/opa5/templates/test/testsuite.qunit.html +0 -10
- package/generators/opa5/templates/test/testsuite.qunit.js +0 -10
- package/generators/uiveri5/index.js +0 -144
- package/generators/uiveri5/templates/.gitignore +0 -2
- package/generators/uiveri5/templates/README.md +0 -11
- package/generators/uiveri5/templates/conf.js +0 -16
- package/generators/wdi5/index.js +0 -96
- package/generators/wdi5/templates/.gitignore +0 -1
- package/generators/wdi5/templates/README-wdi5.md +0 -39
- package/generators/wdi5/templates/basic.test.js +0 -17
- package/generators/wdi5/templates/wdio-wdi5.conf.js +0 -282
- package/helpers/fileaccess.js +0 -90
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
## 3.0.0 (2021-04-08)
|
|
2
|
+
|
|
3
|
+
### New Features
|
|
4
|
+
|
|
5
|
+
Starting with easy-ui5 v3, all templates will be outsource to repositories in the [UI5 Community](https://github.com/ui5-community/). This project is from now on a shell that will offer all generators hosted on that GitHub org. Easy-ui5 will download and install these repositories when needed.
|
|
6
|
+
|
|
7
|
+
By default, it will download the repository [generator-ui5-project](https://github.com/ui5-community/generator-ui5-project/) which contains the templates that were previously integrated in easy-ui5 < 3.
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
NA
|
package/README.md
CHANGED
|
@@ -1,191 +1,96 @@
|
|
|
1
1
|
# Easy UI5 Generator
|
|
2
|
+
|
|
2
3
|
[![NPM version][npm-image]][npm-url]
|
|
3
|
-
[![Build Status][
|
|
4
|
-
[![Dependency Status][
|
|
4
|
+
[![Build Status][test-image]][test-url]
|
|
5
|
+
[![Dependency Status][librariesio-image]][repo-url]
|
|
5
6
|
[![License Status][license-image]][license-url]
|
|
6
|
-
[![REUSE status]
|
|
7
|
+
[![REUSE status][reuse-image]][reuse-url]
|
|
7
8
|
|
|
8
9
|
## Description
|
|
9
10
|
|
|
10
|
-
Easy-ui5 is a [Yeoman](http://yeoman.io/) generator which enables you to create simple [OpenUI5](https://openui5.hana.ondemand.com/)-based web-apps within seconds.
|
|
11
|
+
Easy-ui5 is a [Yeoman](http://yeoman.io/) generator which enables you to create simple [SAPUI5](https://sapui5.hana.ondemand.com/)/[OpenUI5](https://openui5.hana.ondemand.com/)-based web-apps and other UI5-related projects within seconds.
|
|
11
12
|
|
|
12
|
-
This generator has been created to simplify the creation of your
|
|
13
|
+
This generator has been created to simplify the creation of your UI5 prototypes. Now you can scaffold simple UI5 projects from the shell/terminal of your choice. The current best practices (such as [async](https://blogs.sap.com/2018/12/18/ui5ers-buzz-41-best-practices-for-async-loading-in-ui5/)) are already baked into our templates so you don't have to worry about the definition of the metadata files.
|
|
13
14
|
|
|
14
|
-
The purpose of this generator is to guide you on your first steps with SAPUI5 and SAP BTP deployments. Once you are familiar with those technologies, you might want to tweak the projects to adapt them for productive use-cases (such as continuous deployment pipelines and full i18n).
|
|
15
|
+
The purpose of this generator is to guide you on your first steps with [SAPUI5](https://sapui5.hana.ondemand.com/) and [SAP BTP](https://www.sap.com/products/business-technology-platform.html) deployments. Once you are familiar with those technologies, you might want to tweak the projects to adapt them for productive use-cases (such as continuous deployment pipelines and full i18n).
|
|
15
16
|
|
|
17
|
+
## Requirements
|
|
16
18
|
|
|
17
|
-
|
|
18
|
-
During the prompting phase, the generator will ask on which target platform your app should run. Currently, the following options are available:
|
|
19
|
+
- Get [Node.js](https://nodejs.org/en/download/) (**version 12 or higher** ⚠️)
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
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.
|
|
22
|
-
### Application Router @ Cloud Foundry
|
|
23
|
-
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](https://github.com/gregorwolf/SAP-NPM-API-collection/tree/master/apis/approuter) node.js-module that serves the web app.
|
|
24
|
-
### Application Router @ SAP HANA XS Advanced
|
|
25
|
-
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](https://github.com/gregorwolf/SAP-NPM-API-collection/tree/master/apis/approuter) node.js-module that serves the web app.
|
|
26
|
-
### SAP HTML5 Application Repository service for SAP BTP
|
|
27
|
-
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](https://www.youtube.com/watch?v=emnl-y9btdU&list=PLVf0R17F93RXT2tzhHzAr-iiYTmc9KngS&index=11&t=0s) to learn more about the benefits of using the HTML5 application repository.
|
|
28
|
-
### SAP Launchpad service
|
|
29
|
-
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.
|
|
30
|
-
### SAP NetWeaver
|
|
31
|
-
Use this option if you want to deploy your application(s) to the SAP NetWeaver ABAP Repository.
|
|
32
|
-
|
|
33
|
-
## Installation
|
|
34
|
-
|
|
35
|
-
1. Get [Node.js](https://nodejs.org/en/download/) (version 8.5 or higher)
|
|
36
|
-
2. Install the generator
|
|
37
|
-
```sh
|
|
38
|
-
npm install -g yo generator-easy-ui5
|
|
39
|
-
```
|
|
40
|
-
3. Verify your installation to see if Yeoman has been installed correctly
|
|
41
|
-
```sh
|
|
42
|
-
yo
|
|
43
|
-
```
|
|
44
|
-
Make sure you see the `easy-ui5` generator listed.
|
|
21
|
+
## Download and Installation
|
|
45
22
|
|
|
23
|
+
1. Install the generator
|
|
24
|
+
```sh
|
|
25
|
+
npm install -g yo generator-easy-ui5
|
|
26
|
+
```
|
|
27
|
+
2. Verify your installation to see if Yeoman has been installed correctly
|
|
28
|
+
```sh
|
|
29
|
+
yo
|
|
30
|
+
```
|
|
31
|
+
Make sure you see the `easy-ui5` generator listed.
|
|
46
32
|
|
|
47
33
|
## Bootstrapping a new UI5 project
|
|
48
|
-
> Create your first OpenUI5 App within a few seconds!
|
|
49
|
-
|
|
50
|
-
1. Scaffold your OpenUI5 project
|
|
51
|
-
```
|
|
52
|
-
yo easy-ui5
|
|
53
|
-
```
|
|
54
|
-
2. Answer the prompts to create your OpenUI5 project
|
|
55
|
-
3. Run it locally
|
|
56
|
-
```
|
|
57
|
-
cd <your project name>
|
|
58
|
-
npm start
|
|
59
|
-
```
|
|
60
|
-
|
|
61
34
|
|
|
35
|
+
> Create your first UI5 App within a few seconds!
|
|
62
36
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
```
|
|
74
|
-
yo easy-ui5:newcontrol
|
|
75
|
-
```
|
|
37
|
+
1. Scaffold your UI5 project
|
|
38
|
+
```
|
|
39
|
+
yo easy-ui5 project
|
|
40
|
+
```
|
|
41
|
+
2. Answer the prompts to create your new project
|
|
42
|
+
3. Run it locally
|
|
43
|
+
```
|
|
44
|
+
cd <your project directory>
|
|
45
|
+
npm start # or "yarn start"
|
|
46
|
+
```
|
|
76
47
|
|
|
77
|
-
|
|
78
|
-
This sub-generator will create a new model in your manifest. Currently, [JSON](https://sapui5.hana.ondemand.com/#/api/sap.ui.model.json.JSONModel) and [OData v2](https://sapui5.hana.ondemand.com/#/api/sap.ui.model.odata.v2.ODataModel) models are supported with various configuration options.
|
|
79
|
-
```
|
|
80
|
-
yo easy-ui5:newmodel
|
|
81
|
-
```
|
|
48
|
+
## Target platforms
|
|
82
49
|
|
|
83
|
-
|
|
84
|
-
This sub-generator will add a new component usage for component reuse to your manifest.
|
|
85
|
-
```
|
|
86
|
-
yo easy-ui5:newcomponentusage
|
|
87
|
-
```
|
|
50
|
+
During the prompting phase, the generator will ask on which target platform your app should run. Currently, the following options are available:
|
|
88
51
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
```
|
|
94
|
-
This sub-generator will create a UIVeri5 page object and a new test that shows how to use the page object:
|
|
95
|
-
```
|
|
96
|
-
yo easy-ui5:newuiveri5po
|
|
97
|
-
```
|
|
98
|
-
This sub-generator will create a UIVeri5 spec file:
|
|
99
|
-
```
|
|
100
|
-
yo easy-ui5:newuiveri5spec
|
|
101
|
-
```
|
|
52
|
+
- Static webserver
|
|
53
|
+
- SAP BTP
|
|
54
|
+
- SAP HANA XS Advanced
|
|
55
|
+
- SAP NetWeaver
|
|
102
56
|
|
|
103
|
-
|
|
104
|
-
This sub-generator will add a basic [OPA5](https://openui5.hana.ondemand.com/topic/2696ab50faad458f9b4027ec2f9b884d) test setup. You can add page objects now or later with another sub-generator.
|
|
105
|
-
```
|
|
106
|
-
yo easy-ui5:opa5
|
|
107
|
-
```
|
|
108
|
-
This sub-generator will create an OPA5 page object and add it to your journeys:
|
|
109
|
-
```
|
|
110
|
-
yo easy-ui5:newopa5po
|
|
111
|
-
```
|
|
112
|
-
This sub-generator will create an OPA5 journey and add it to your test page:
|
|
113
|
-
```
|
|
114
|
-
yo easy-ui5:newopa5journey
|
|
115
|
-
```
|
|
57
|
+
> Have a look at [this plugin project](https://github.com/ui5-community/generator-ui5-project/) for more usage instruction and information about the available subcommands.
|
|
116
58
|
|
|
117
|
-
### `wdi5` test framework
|
|
118
59
|
|
|
119
|
-
|
|
60
|
+
## More generators
|
|
120
61
|
|
|
121
|
-
|
|
122
|
-
-
|
|
123
|
-
- a sample test file
|
|
62
|
+
And this is just the start!
|
|
63
|
+
We made easy-ui5 extensible, so that the entire [UI5 Community](https://github.com/ui5-community/) can build additional plugins to scaffold any UI5-related development activity.
|
|
124
64
|
|
|
125
|
-
|
|
65
|
+
By default, this generator comes with the [project-creation-plugin](https://github.com/ui5-community/generator-ui5-project) but there are many others as well:
|
|
66
|
+
- Create new UI5 libraries [[ui5-community/generator-ui5-library]](https://github.com/ui5-community/generator-ui5-library)
|
|
67
|
+
- More are coming!
|
|
68
|
+
<!-- - Create new UI5 custom controls
|
|
69
|
+
- Create middlewares for the UI5 tooling
|
|
70
|
+
- Create tasks for the UI5 tooling
|
|
71
|
+
- Create a WDI5 test suite -->
|
|
126
72
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
73
|
+
To download and use any of the plugins above, run the following command
|
|
74
|
+
```sh
|
|
75
|
+
yo easy-ui5 [project|library] # this is the name of the repositorty without the "generator-ui5-" prefix
|
|
130
76
|
```
|
|
131
77
|
|
|
132
|
-
|
|
133
|
-
Depending on your target platform you'll need to install additional tools:
|
|
134
|
-
|
|
135
|
-
### Cloud Foundry
|
|
136
|
-
#### Required tools
|
|
137
|
-
1. [Create a free account](https://developers.sap.com/mena/tutorials/hcp-create-trial-account.html) on SAP BTP Trial
|
|
138
|
-
2. [Install](https://developers.sap.com/tutorials/cp-cf-download-cli.html) the Cloud Foundry Command Line Interface
|
|
139
|
-
```sh
|
|
140
|
-
cf login
|
|
141
|
-
```
|
|
142
|
-
3. [Install](https://github.com/cloudfoundry-incubator/multiapps-cli-plugin) the MultiApps CF CLI Plugin
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
#### Deploy
|
|
146
|
-
Call this command from the root directory to deploy the application to Cloud Foundry
|
|
147
|
-
```
|
|
148
|
-
npm run deploy
|
|
149
|
-
```
|
|
78
|
+
<!-- Are you missing a generator in this list and are you willing to provide one to the entire UI5 community? Great! [This blog posts](TODO INSERT LINK HERE) contains everything you need to know to get started! -->
|
|
150
79
|
|
|
80
|
+
## Calling generators
|
|
151
81
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
> `cf install-plugin -r CF-Community "html5-plugin"`
|
|
156
|
-
>
|
|
157
|
-
> With this tool you can update your web app without the need to deploy a new cloud application:
|
|
158
|
-
>
|
|
159
|
-
> `cf html5-push -n html5_repo_host .`
|
|
160
|
-
|
|
161
|
-
### SAP HANA XSA
|
|
162
|
-
#### Required tools
|
|
163
|
-
1. SAP HANA or [create a free](https://developers.sap.com/group.hxe-install-binary.html) SAP HANA Express system
|
|
164
|
-
2. [Install](https://developers.sap.com/tutorials/hxe-ua-install-xs-xli-client.html) the XS CLI Client
|
|
165
|
-
```sh
|
|
166
|
-
xs login
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
#### Deploy
|
|
170
|
-
Call this command from the root directory to deploy the application to HANA XSA
|
|
171
|
-
```
|
|
172
|
-
npm run deploy
|
|
82
|
+
Run the following command to see all subgenerators of a given plugin
|
|
83
|
+
```sh
|
|
84
|
+
yo easy-ui5 [project|library] --list
|
|
173
85
|
```
|
|
86
|
+
Once you decided on the subgenerator, run:
|
|
174
87
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
Run following command to deploy the application to SAP NetWeaver
|
|
179
|
-
```
|
|
180
|
-
npm run deploy
|
|
88
|
+
Run the following command to see all subgenerators of a given plugin
|
|
89
|
+
```sh
|
|
90
|
+
yo easy-ui5 [project|library] <sub-generator-id>
|
|
181
91
|
```
|
|
182
92
|
|
|
183
|
-
##
|
|
184
|
-
This project leverages (among others) the following Open Source projects:
|
|
185
|
-
* [UI5 Build and Development Tooling](https://github.com/SAP/ui5-tooling)
|
|
186
|
-
* [OpenUI5. Build Once. Run on any device.](https://github.com/SAP/openui5)
|
|
187
|
-
|
|
188
|
-
## Support
|
|
93
|
+
## How to obtain support
|
|
189
94
|
|
|
190
95
|
Please use the GitHub bug tracking system to post questions, bug reports or to create pull requests.
|
|
191
96
|
|
|
@@ -195,20 +100,13 @@ We welcome any type of contribution (code contributions, pull requests, issues)
|
|
|
195
100
|
|
|
196
101
|
Please follow our instructions if you would like to [contribute](https://github.com/SAP/generator-easy-ui5/blob/master/CONTRIBUTING.md).
|
|
197
102
|
|
|
198
|
-
## To-Do
|
|
199
|
-
|
|
200
|
-
The following aspects/features are not yet implemented:
|
|
201
|
-
* Decouple the sub-generators from the main flow. E.g. so that app router modules can be added after the generation of the UI5 web app.
|
|
202
|
-
|
|
203
|
-
Contributions are very much appreciated.
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
103
|
[npm-image]: https://img.shields.io/npm/v/generator-easy-ui5.svg
|
|
208
104
|
[npm-url]: https://www.npmjs.com/package/generator-easy-ui5
|
|
209
|
-
[
|
|
210
|
-
[
|
|
211
|
-
[
|
|
212
|
-
[
|
|
105
|
+
[test-image]: https://github.com/SAP/generator-easy-ui5/actions/workflows/main.yml/badge.svg
|
|
106
|
+
[test-url]: https://github.com/SAP/generator-easy-ui5/actions/workflows/main.yml
|
|
107
|
+
[librariesio-image]: https://img.shields.io/librariesio/github/SAP/generator-easy-ui5
|
|
108
|
+
[repo-url]: https://github.com/SAP/generator-easy-ui5
|
|
213
109
|
[license-image]: https://img.shields.io/npm/l/generator-easy-ui5.svg
|
|
214
110
|
[license-url]: https://github.com/SAP/generator-easy-ui5/blob/master/LICENSE
|
|
111
|
+
[reuse-image]: https://api.reuse.software/badge/github.com/SAP/generator-easy-ui5/
|
|
112
|
+
[reuse-url]: https://api.reuse.software/info/github.com/SAP/generator-easy-ui5/
|