This repository hosts all data and architecture (front- and back-end) related to the BiH Election Portal. The three permanent branches contain the following information:
- master: all raw and cleaned data, the backend infrastructure and frontend application (backbone.js website and associated materials).
- gh-pages: the deployed frontend.
To install dependencies, run these commands from the base folder: npm install && bower install
To deploy locally: grunt serve
To build: grunt build
master branch contains production files. gh-pages mirrors the dist/ folder. Branch from master to do development. Pull request into master. Then build and push new dist/ folder to master before pushing to gh-pages.
Workflow:
-
Work in
app/folder. -
If a new file is created, ensure it is captured in
Gruntfile.js -
To serve locally, run
grunt serve. Site will run onlocalhost:9000. -
To build the site, run
grunt build. This will update thedist/folder. Ensure that Gruntfile.js has copied all site files. -
Push all changes to
masterbranch: bothapp/anddist/ -
Run
git subtree push --prefix dist origin gh-pagesto pushdist/files togh-pagesbranch. -
If there are problems pushing to
gh-pagesbecause your version of dist is behind the remote (not pushing tomasterfirst, usinggit revert, etc), then run this command to force the push togh-pages:git push origin `git subtree split --prefix dist master` :gh-pages --force