From 5d8880fdfae7de50d867eb9695b704f50ab77775 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Wed, 7 May 2014 19:38:27 -0700 Subject: move Grunt info from README into HTML docs Fixes #13470 --- docs/_includes/getting-started/grunt.html | 32 +++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 docs/_includes/getting-started/grunt.html (limited to 'docs/_includes/getting-started/grunt.html') 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 @@ +
+

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.

+
-- cgit v1.2.3