Grunt Support for UI5 Boilerplate

With the last submit of UI5 Mobile BoilerplateGrunt Support was added to the Boilerplate. It is now possible to start a dev server from command line. Grunt is a Java Script Task Runner, which can be used to automate recurring tasks, like unit test, minification or packaging the web app. Probably Grunt will also be used as build infrastructure for OpenUI5.

Start Dev Server

We use Grunt to start a dev web server and show the UI5 boilerplate in the browser. To do so, type the following in the root folder of the UI5 boilerplate project in the terminal/command:

grunt server

As you can see express server is started, which serves our web app and also a watch task is started, which tracks changes on the source code.

Additionally the browser is started with the UI5 boilderplate:

With CTRL + C the dev server can be stopped.

Before you can use this you have to execute some one time setup tasks:

Setup

We assume you have node.js installed. Then you have to execute to following code in the command line/terminal. The first line will install globally the grunt command line tool. Probably you need to use sudo or have Administrator rights to execute. All this has to be done only once:

npm install -g grunt-cli
npm install

This will install the Grunt command line tool and all necessary components (folder node_modules) to run the dev server.