aboutsummaryrefslogtreecommitdiff
path: root/docs/_includes
diff options
context:
space:
mode:
authorChris Rebert <[email protected]>2014-05-07 19:38:27 -0700
committerChris Rebert <[email protected]>2014-05-07 19:38:27 -0700
commit5d8880fdfae7de50d867eb9695b704f50ab77775 (patch)
treeaac320e39465ac5c1577e10a3f098ac3ff564a42 /docs/_includes
parentf0daa64a29a66a663f6fedb9d8687524af754436 (diff)
downloadbootstrap-5d8880fdfae7de50d867eb9695b704f50ab77775.tar.xz
bootstrap-5d8880fdfae7de50d867eb9695b704f50ab77775.zip
move Grunt info from README into HTML docs
Fixes #13470
Diffstat (limited to 'docs/_includes')
-rw-r--r--docs/_includes/getting-started/grunt.html32
-rw-r--r--docs/_includes/nav/getting-started.html8
2 files changed, 40 insertions, 0 deletions
diff --git a/docs/_includes/getting-started/grunt.html b/docs/_includes/getting-started/grunt.html
new file mode 100644
index 000000000..93fa44a70
--- /dev/null
+++ b/docs/_includes/getting-started/grunt.html
@@ -0,0 +1,32 @@
+<div class="bs-docs-section">
+ <h1 id="grunt" class="page-header">Compiling CSS and JavaScript</h1>
+
+ <p class="lead">Bootstrap uses <a href="http://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>
+
+ <h2 id="grunt-installing">Installing Grunt</h2>
+ <p>To install Grunt, you must <strong>first <a href="http://nodejs.org/download/">download and install node.js</a></strong> (which includes npm). npm stands for <a href="http://npmjs.org/">node packaged modules</a> and is a way to manage development dependencies through node.js.</p>
+
+ Then, from the command line:
+ <ol>
+ <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 <a href="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>
+
+ <h2 id="grunt-commands">Available Grunt commands</h2>
+ <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>
+
+ <h3><code>grunt test</code> (Run tests)</h3>
+ <p>Runs <a href="http://jshint.com">JSHint</a> and runs the <a href="http://qunitjs.com">QUnit</a> tests headlessly in <a href="http://phantomjs.org">PhantomJS</a>.</p>
+
+ <h3><code>grunt</code> (Build absolutely everything and run tests)</h3>
+ <p>Compiles and minifies CSS and JavaScript, builds the documentation website, runs the HTML5 validator against the docs, regenerates the Customizer assets, and more. Usually only necessary if you're hacking on Bootstrap itself.</p>
+
+ <h2 id="grunt-troubleshooting">Troubleshooting</h2>
+ <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>
+</div>
diff --git a/docs/_includes/nav/getting-started.html b/docs/_includes/nav/getting-started.html
index 494a2950f..df94dc099 100644
--- a/docs/_includes/nav/getting-started.html
+++ b/docs/_includes/nav/getting-started.html
@@ -9,6 +9,14 @@
</ul>
</li>
<li>
+ <a href="#grunt">Compiling CSS and JavaScript</a>
+ <ul class="nav">
+ <li><a href="#grunt-installing">Installing Grunt</a></li>
+ <li><a href="#grunt-commands">Available Grunt commands</a></li>
+ <li><a href="#grunt-troubleshooting">Troubleshooting</a></li>
+ </ul>
+</li>
+<li>
<a href="#template">Basic template</a>
</li>
<li>