SAPUI5 SDK
A package which downloads the official SAPUI5 SDK from https://tools.hana.ondemand.com/ for local development.
Installation
By using this npm package you agree to the EULA from SAP: https://tools.hana.ondemand.com/developer-license-3_1.txt/
npm install -D sapui5-sdk
or
yarn add -D sapui5-sdk
This will download and unzip the latest SAPUI5 SDK.
Proxy support
It is possible to use this package behind a proxy by setting the environment variables HTTP_PROXY
and HTTPS_PROXY
.
Linux / macOS
export HTTP_PROXY http://hostname:portexport HTTPS_PROXY https://hostname:port
Windows
set HTTP_PROXY=http://hostname:portset HTTPS_PROXY=https://hostname:port
It is also possible to use proxy servers which require authentication: https://username:password@hostname:port
Installing a specific version
In case you need a specific version of SAPUI5 you can specify it in your package.json
.
Add the following line to your package.json
:
"sapui5-sdk":
You need to replace X.Y.Z
with a valid version from https://tools.hana.ondemand.com/.
If you already added sapui5-sdk to your dependencies you need to run npm rebuild
after setting a specified version. If you added this setting to your package.json
before installing the package, you can just install sapui5-sdk as usual.
Get started
After a successful installation you can use a server to serve the SDK as static files.
Express example
const express = const sapui5 = const app = appapp app
Hapi example
const Hapi = const inert = const sapui5 = const server = Hapi const init = async { await server server; await serverstart}
UI5 Tooling example
Add the custom UI5 middleware to serve static resources:
npm install -D ui5-middleware-servestatic
or
yarn add -D ui5-middleware-servestatic
Add the UI5 dependency declaration to package.json
:
"ui5":
Add the custom middleware configuration to ui5.yaml
server: customMiddleware: - name: ui5-middleware-servestatic afterMiddleware: compression mountPath: /resources configuration: rootPath: "./node_modules/sapui5-sdk/lib/resources" - name: ui5-middleware-servestatic afterMiddleware: compression mountPath: /test-resources configuration: rootPath: "./node_modules/sapui5-sdk/lib/test-resources"
Grunt OpenUI5 example
const sapui5 = module { grunt grunt grunt grunt grunt grunt grunt grunt}
Contribution
I'm happy to accept Pull Requests! Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
Credits
This project was heavily inspired by openui5.runtime.downloader by Marius Augenstein.
License
MIT ❤️