<pclass="lead">Bootstrap uses <ahref="https://gruntjs.com/">Grunt</a> for its build system, with convenient methods for working with the framework. It's how we compile our code, run tests, and more.</p>
<p>To install Grunt, you must <strong>first <ahref="https://nodejs.org/download/">download and install node.js</a></strong> (which includes npm). npm stands for <ahref="https://www.npmjs.com/">node packaged modules</a> and is a way to manage development dependencies through node.js.</p>
<li>Install <code>grunt-cli</code> globally with <code>npm install -g grunt-cli</code>.</li>
<li>Navigate to the root <code>/bootstrap/</code> directory, then run <code>npm install</code>. npm will look at the <ahref="https://github.com/twbs/bootstrap/blob/master/package.json"><code>package.json</code></a> file and automatically install the necessary local dependencies listed there.</li>
</ol>
<p>When completed, you'll be able to run the various Grunt commands provided from the command line.</p>
<h3><code>grunt dist</code> (Just compile CSS and JavaScript)</h3>
<p>Regenerates the <code>/dist/</code> directory with compiled and minified CSS and JavaScript files. As a Bootstrap user, this is normally the command you want.</p>
<h3><code>grunt watch</code> (Watch)</h3>
<p>Watches the Less source files and automatically recompiles them to CSS whenever you save a change.</p>
<p>Runs <ahref="http://jshint.com/">JSHint</a> and runs the <ahref="https://qunitjs.com/">QUnit</a> tests in real browsers thanks to <ahref="https://karma-runner.github.io/2.0/index.html">Karma</a>.</p>
<p>Builds and tests CSS, JavaScript, and other assets which are used when running the documentation locally via <code>bundle exec jekyll serve</code>.</p>
<p>Compiles and minifies CSS and JavaScript, builds the documentation website, runs the HTML5 validator against the docs, regenerates the Customizer assets, and more. Requires <ahref="https://jekyllrb.com/docs/installation/">Jekyll</a>. Usually only necessary if you're hacking on Bootstrap itself.</p>
<p>Should you encounter problems with installing dependencies or running Grunt commands, first delete the <code>/node_modules/</code> directory generated by npm. Then, rerun <code>npm install</code>.</p>