I’m using bootstrap a lot these days for a couple of websites I’m setting up. In addition to bootstrap, I had been using a css file for my own changes that I wanted to make. However, now I’m starting to make more than just a couple of changes, so I want to learn how to recompile my own bootstrap file. Here’s all I’ve done.

$ mkdir src
$ cd src
$ wget https://github.com/twbs/bootstrap/archive/v3.3.1.zip
$ unzip v3.3.1.zip
$ cd bootstrap-3.3.1
$ npm install
$ npm install -g grunt-cli

Then, edit the file less/variables.less for whatever changes you want to make. Recompile the css and copy the new css files to the main project area.

$ grunt dist
$ cp dist/css/* ../../css