README.md

Bootstrap

Provides a front-end framework for easier integration of the EPFL graphic charter.

Developers: Julien Ramboz, Francesco De Rose
Maintainers: Olivier Bieler, William Belle
Backup: Gregory Charmier
User Documentation: EPFL Bootstrap, Blog
Technical Documentation: Confluence
Git: kis-bootstrap

Infrastructure

See the infrastructure page on Confluence.

Setup

Prerequisites

You will need a recent version of nodejs (>=8.0.0). You can install it via nvm.

If not already installed, also add:

brew update && brew install fontforge ttfautohint
sudo gem install sass
sudo npm install -g phantomjs casperjs
sudo npm install -g grunt-cli bower

On Linux use sudo apt-get install ... instead of brew.

sudo apt-get install nodejs npm nodejs-legacy
sudo apt-get install gem ruby
sudo apt-get install fontforge ttfautohint
sudo gem install sass
sudo npm install -g phantomjs casperjs
sudo npm install -g grunt-cli bower
sudo rm -rf ~/tmp

Project installation

Then, to get started on the project:

git clone git@github.com:epfl-idevelop/kis-bootstrap.git
cd kis-bootstrap
npm install
bower install

Project structure

The application folder is organised as follows:

Folder Usage
app/ application source files
app/doc documentation
app/doc/styleguide style guide sources
app/doc/styleguide/_theme style guide theme
app/images images
app/images/icons vectorial icons (for the icon font)
app/images/sprites sprite images
app/includes html includes to be used inside templates
app/scripts scripts sources
app/scripts/plugins EPFL-specific scripts
app/scripts/ui-lib Generic UI scripts
app/styles styles sources
app/templates demo templates
app/vendor 3rd-party vendor libraries
build/ generated development files
release/ generated optimised files ready for production
tests/ test suites
tools/ server tools
bower.json 3rd-party libraries specifications
Gruntfile.coffee app building tasks
package.json app definition and dependencies
README.md this file

Grunt tasks

Various grunt tasks are available for the project. They are as follows:

Task name Usage
grunt complete build cycle that generates production files
grunt release-staging complete build cycle that generates staging files
grunt build generate development files
grunt build-ci generate development files for test
grunt build-opt generate optimized production-ready files
grunt serve generate development files and watch for changes
grunt serve-opt generate optimized files and watch for changes
grunt test test development files and watch for changes
grunt test-ci test development files in Travis
grunt test-opt test optimized files and watch for changes
grunt bump:patch increase patch version number (Z in X.Y.Z)
grunt bump:minor increase minor version number (Y in X.Y.Z)
grunt bump:major increase major version number (X in X.Y.Z)
grunt compress create package from optimized files in release/

Build

To start the development server (non-optimized files):

grunt serve

To start the production server (optimized files):

grunt serve-opt --force

Updating the global header

Edit the following files:

app/includes/epfl-header-panels.en.html
app/includes/epfl-header-panels.fr.html

Test

To test the library using the default non-optimized require loading:

grunt test

To test the library using the optimised single-file require loading:

grunt test-opt --force

Deploy

Check the changes since the last release (vX.Y.Z):

git shortlog vX.Y.Z..HEAD

Update the changelog accordingly, and then:

grunt bump:patch (or minor/major)

For staging, do:

grunt release-staging
grunt compress
scp release/*.tgz kis@exopgesrv1.epfl.ch:~

or for production:

grunt
grunt compress
scp release/*.tgz kis@kissrv104.epfl.ch:~
scp release/*.tgz kis@kissrv105.epfl.ch:~

Finally execute this command on each infrastructure

~/app.sh deploy epfl-bootstrap-vX.Y.Z-release.tgz

In case a problem in production occurs on the current version do a roll back

~/app.sh rollback 0.15.0
rm -rf ~/static.epfl.ch/v0.16.0/
~/app.sh deploy epfl-bootstrap-v0.16.0-release.tgz

Tagging

git tag -a v<version> -m "Version <version>"
git push --tags

and don't forget to post release info on the blog.