Book Image

Less Web Development Cookbook

Book Image

Less Web Development Cookbook

Overview of this book

Table of Contents (19 chapters)
Less Web Development Cookbook
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Downloading and installing Bootstrap


In this recipe, you will learn how to install Bootstrap and start your first project.

Getting ready

You can download the required files from http://getbootstrap.com/getting-started/#download. Choose the source version at this page, which includes the Less source files, too.

For this recipe, you should have Node.js and Grunt installed on your system. You can read how to install Node.js and the Node.js Package Manager in the Installing Node and Grunt recipe in Chapter 11, Compiling Less Real Time for Development Using Grunt.

How to do it...

You need to perform the following steps:

  1. Download the ZIP archive that contains the Bootstrap source files and unzip this file into your working directory. Alternatively, run the following command in your console:

    npm install bootstrap
    
  2. Then, run this command in your console:

    npm install
    
  3. Now, you can compile Bootstrap by running this command:

    grunt dist
    
  4. The compiled CSS code can be used in your HTML by adding the following...