Frontend

This section describes the frontend code and how to build it

Building

We use grunt to build our frontend code. It is generated from the sources in client/ and is output to offenesparlament/offenesparlament/static/.

We commit all generated files to git.

Grunt is already installed in the vagrant VM, so you should be able to run the build task from the VM right away in the dir /vagrant:

grunt dev

This task watches all source files and rebuilds if necessary.

To use BrowserSync and have the browser reload every time frontend files change, run:

grunt reloading

Grunt too slow?

If grunt is too slow running inside the VM (Probably due to file-watching on the host system) you’ll have to install the following on your computer:

Then you can run grunt tasks on your computer from the project dir OffenesParlament (where the Gruntfile.coffee is located)