OpenUI5 sample app using the UI5 Tooling.
A deployed version of the openui5-sample-app is hosted on GitHub Pages.
Clone this repository and navigate into it
git clone https://github.com/SAP/openui5-sample-app.git
cd openui5-sample-app
Install all dependencies
npm install
Start a local server and run the application (http://localhost:8080/index.html)
ui5 serve -o index.html
npm run lint
npm run watch
npm test
ui5 build -a
/dist
directory)npm run serve-dist
rm -rf ./dist
self-contained
build to create a bundle with all of your applications runtime dependencies
ui5 build self-contained -a
/dist
directory)npm run serve-dist
For local development of your applications' dependencies (like OpenUI5 libraries) you can use UI5 Workspaces. This will allow you to make changes to those dependencies locally and see the impact in your application immediately.
The following needs to be done just once per setup.
package.json
file
git clone https://github.com/SAP/openui5.git
cd openui5
npm install
Would you like to work on the application project and one or more of its UI5 framework dependencies at the same time? We got you covered!
ui5-workspace.yaml
in the root folder of the project, right next to the ui5.yaml
ui5-workspace.yaml
, add the paths to the local dependencies you'd like to use from your local machine:
specVersion: workspace/1.0
metadata:
name: default
dependencyManagement:
resolutions:
# local path to OpenUI5. It will resolve all required libraries and transitive dependencies.
- path: /local/path/to/openui5
npm run start
You can now make changes in your local OpenUI5 repository and see the impact directly when serving or building your application.
If a dependency that is listed in ui5.yaml
is omitted in the resolutions
section of ui5-workspace.yaml
, the library is resolved in the usual way by downloading it from the registry. For more information about dependency resolutions, check here.
The workspace feature always uses the default
workspace and always attempts to resolve any dependencies from it. If you'd like to use the workspace for local development but want to resolve the libraries in the usual way by default, you can name the workspace and use that name later, for example like this:
specVersion: workspace/1.0
metadata:
name: local-dependencies # Not "default"
dependencyManagement:
resolutions:
- path: /local/path/to/openui5
# Starts a server with a named workspace
npm run start -- -w local-dependencies