Skip to Content
Technical Articles

npm runs UI5!

We have really good times for robust UI5 development thanks to the tools available for usage locally using Node & npm (sorry SAP Web IDE…). Maybe they are not essential for coding, but for those ones who like to shorten, automate or tweak many processes around development tasks – npm run can do plenty of good stuff.

Here’s an extract of some tasks helpful for my development cases. I hope these examples will serve as an advertisement and a review of tools around UI5.

  • local – starts a local version of my app, based on a mock server. It uses ui5-tooling for running web server.
  • local-sync – starts browsersync for auto-reloading of the app after each change in “webapp” folder [there is also ui5-middleware-livereload for ui5 serve]
  • local-with-sync – combines the both tasks, npm-run-all used for parallelizing them
  • proxy – runs the application connected to the real backend, with URL rewriting. This is configured using Grunt with connect, proxy and watch tasks [can be done with ui5-middleware-simpleproxy I guess]
  • proxy-sync and proxy-with-sync – similar as with local scripts – browsersync for reloading the brower
  • eslint – run ESLint over webapp *.js files
  • analyze – runs very nice ui5-migration tool, which checks for deprecated API and optimalization hints for my target UI5 version
  • fix – like above, but this time ui5-migration tool will apply corrections.
  • uiveri5 – runs e2e tests prepared with uiveri5 tool.
  • uiveri5-timeout – like above, but with timeout at the beginning required for the next task…
  • proxy-check – …which is full check of the app: run ESLint, then analyze with ui5-migration, then run unit and integration tests using Karma and finally e2e tests – but a server with proxy is first started, so uiveri5 needs to wait. I’m using simple timeout command, as wait-on seems to have this issue on my computer.
  • check – like above, but a proxy server is already started
  • deploy-dev – prepare the app using ui5-tooling build, which is next uploaded to the development server using Grunt task based on grunt-nwabap-ui5uploader.


I hope this example shows how much stuff can be done by typing one command in your console. And there is plenty more which can be done with pure Javascript – transpiling, formatting the code, build-specific file operations etc. From UI5 perspective, I would warmly welcome if Support Assistant could run as a task and produce linter-style output.


Be the first to leave a comment
You must be Logged on to comment or reply to a post.