Compiling the Bootstrap CSS and JavaScript

Now that we've seen how Bootstrap can be used to great effect in getting our site off the ground, we can well decide that we want to move away from simply using the precompiled CSS file and compile the code ourselves.

The main reason for doing this is to update or alter the code to fit our requirements—we should not forget that Bootstrap is intended to be customized in this manner! Fortunately, Bootstrap uses Grunt, which we discussed and installed earlier in the book (in Chapter 2, Building a Less Development Toolkit). Bootstrap comes preconfigured with its own package.json file, making compilation a cinch. All we have to do is:

  1. Fire up a command prompt window, and then navigate to the root of the /bootstrap ...

Get Learning Less.js now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.