Build tools
Bootstrap uses npm scripts for its build system. Our includes convenient methods for working with the framework, including compiling code, running tests, and more.
To use our build system and run our documentation locally, you’ll need a copy of Bootstrap’s source files and Node. Follow these steps and you should be ready to rock:
- Download and install Node.js, which we use to manage our dependencies.
- Navigate to the root directory and run
npm install
to install our local dependencies listed in .
Run npm run
to see all the npm scripts.
Bootstrap uses Autoprefixer (included in our build process) to automatically add vendor prefixes to some CSS properties at build time. Doing so saves us time and code by allowing us to write key parts of our CSS a single time while eliminating the need for vendor mixins like those found in v3.
Running our documentation locally requires the use of Jekyll, a decently flexible static site generator that provides us: basic includes, Markdown-based files, templates, and more. Here’s how to get it started:
- Run through the above to install Jekyll (the site builder) and other Ruby dependencies with
bundle install
. - From the root
/bootstrap
directory, runnpm run docs-serve
in the command line.
Should you encounter problems with installing dependencies, uninstall all previous dependency versions (global and local). Then, rerun npm install
.