From 5d8880fdfae7de50d867eb9695b704f50ab77775 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Wed, 7 May 2014 19:38:27 -0700 Subject: [PATCH] move Grunt info from README into HTML docs Fixes #13470 --- README.md | 36 ----------------------- docs/_includes/getting-started/grunt.html | 32 ++++++++++++++++++++ docs/_includes/nav/getting-started.html | 8 +++++ docs/getting-started.html | 1 + 4 files changed, 41 insertions(+), 36 deletions(-) create mode 100644 docs/_includes/getting-started/grunt.html diff --git a/README.md b/README.md index 5ef008d03b..802b4c7c42 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,6 @@ To get started, check out ! - [Quick start](#quick-start) - [Bugs and feature requests](#bugs-and-feature-requests) - [Documentation](#documentation) - - [Compiling CSS and JavaScript](#compiling-css-and-javascript) - [Contributing](#contributing) - [Community](#community) - [Versioning](#versioning) @@ -78,41 +77,6 @@ Documentation for v2.3.2 has been made available for the time being at +

Compiling CSS and JavaScript

+ +

Bootstrap uses Grunt for its build system, with convenient methods for working with the framework. It's how we compile our code, run tests, and more.

+ +

Installing Grunt

+

To install Grunt, you must first download and install node.js (which includes npm). npm stands for node packaged modules and is a way to manage development dependencies through node.js.

+ + Then, from the command line: +
    +
  1. Install grunt-cli globally with npm install -g grunt-cli.
  2. +
  3. Navigate to the root /bootstrap/ directory, then run npm install. npm will look at the package.json file and automatically install the necessary local dependencies listed there.
  4. +
+ +

When completed, you'll be able to run the various Grunt commands provided from the command line.

+ +

Available Grunt commands

+

grunt dist (Just compile CSS and JavaScript)

+

Regenerates the /dist/ directory with compiled and minified CSS and JavaScript files. As a Bootstrap user, this is normally the command you want.

+ +

grunt watch (Watch)

+

Watches the Less source files and automatically recompiles them to CSS whenever you save a change.

+ +

grunt test (Run tests)

+

Runs JSHint and runs the QUnit tests headlessly in PhantomJS.

+ +

grunt (Build absolutely everything and run tests)

+

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.

+ +

Troubleshooting

+

Should you encounter problems with installing dependencies or running Grunt commands, first delete the /node_modules/ directory generated by npm. Then, rerun npm install.

+ diff --git a/docs/_includes/nav/getting-started.html b/docs/_includes/nav/getting-started.html index 494a2950fc..df94dc099a 100644 --- a/docs/_includes/nav/getting-started.html +++ b/docs/_includes/nav/getting-started.html @@ -8,6 +8,14 @@
  • Source code
  • +
  • + Compiling CSS and JavaScript + +
  • Basic template
  • diff --git a/docs/getting-started.html b/docs/getting-started.html index f5852a9e03..f2c43f289c 100644 --- a/docs/getting-started.html +++ b/docs/getting-started.html @@ -7,6 +7,7 @@ lead: "An overview of Bootstrap, how to download and use, basic templates and ex {% include getting-started/download.html %} {% include getting-started/whats-included.html %} +{% include getting-started/grunt.html %} {% include getting-started/template.html %} {% include getting-started/examples.html %} {% include getting-started/rtl.html %}