Preparing a new Bootstrap project
After installing Bootstrap CLI, you can create a new Bootstrap project by running the following command in your console:
bootstrap new --template empty-bootstrap-project-gulp
Enter the name of your project for the question: "What's the project called? (no spaces)". A new folder with the project name will be created. After the setup process, the directory and file structure of your new project folder should look like that shown in the following screenshot:
The project folder also contains a Gulpfile.js
file. In Chapter 2, Creating Your Own Build Process with Gulp, you can read how to set up a Bootstrap project with a Gulp build process yourself.
Now you can run the bootstrap watch command in your console and start editing the html/pages/index.html
file. The HTML templates are compiled with Panini. Panini is a flat file compiler which helps you to create HTML pages with consistent layouts and reusable partials with ease.
You can read more about Panini at http://foundation.zurb.com/sites/docs/panini.html.
Panini compiles the HTML templates into a single index.html
file like the base template described in the preceding sections.