source: Dev/trunk/node_modules/grunt-contrib-less/README.md @ 533

Last change on this file since 533 was 484, checked in by hendrikvanantwerpen, 11 years ago

Commit node_modules, to make checkouts and builds more deterministic.

File size: 5.0 KB
Line 
1# grunt-contrib-less [![Build Status](https://travis-ci.org/gruntjs/grunt-contrib-less.png?branch=master)](https://travis-ci.org/gruntjs/grunt-contrib-less)
2
3> Compile LESS files to CSS.
4
5
6
7## Getting Started
8This plugin requires Grunt `~0.4.0`
9
10If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
11
12```shell
13npm install grunt-contrib-less --save-dev
14```
15
16Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
17
18```js
19grunt.loadNpmTasks('grunt-contrib-less');
20```
21
22*This plugin was designed to work with Grunt 0.4.x. If you're still using grunt v0.3.x it's strongly recommended that [you upgrade](http://gruntjs.com/upgrading-from-0.3-to-0.4), but in case you can't please use [v0.3.2](https://github.com/gruntjs/grunt-contrib-less/tree/grunt-0.3-stable).*
23
24
25## Less task
26_Run this task with the `grunt less` command._
27
28Task targets, files and options may be specified according to the grunt [Configuring tasks](http://gruntjs.com/configuring-tasks) guide.
29### Options
30
31#### paths
32Type: `String|Array`
33Default: Directory of input file.
34
35Specifies directories to scan for @import directives when parsing. Default value is the directory of the source, which is probably what you want.
36
37#### compress
38Type: `Boolean`
39Default: False
40
41Compress output by removing some whitespaces.
42
43#### yuicompress
44Type: `Boolean`
45Default: False
46
47Compress output using cssmin.js
48
49#### ieCompat
50Type: `Boolean`
51Default: true
52
53Enforce the css output is compatible with Internet Explorer 8.
54
55For example, the [data-uri](https://github.com/cloudhead/less.js/pull/1086) function encodes a file in base64 encoding and embeds it into the generated CSS files as a data-URI. Because Internet Explorer 8 limits `data-uri`s to 32KB, the [ieCompat](https://github.com/cloudhead/less.js/pull/1190) option prevents `less` from exceeding this.
56
57#### optimization
58Type: `Integer`
59Default: null
60
61Set the parser's optimization level. The lower the number, the less nodes it will create in the tree. This could matter for debugging, or if you want to access the individual nodes in the tree.
62
63#### strictImports
64Type: `Boolean`
65Default: False
66
67Force evaluation of imports.
68
69#### syncImport
70Type: `Boolean`
71Default: False
72
73Read @import'ed files synchronously from disk.
74
75#### dumpLineNumbers
76Type: `String`
77Default: false
78
79Configures -sass-debug-info support.
80
81Accepts following values: `comments`, `mediaquery`, `all`.
82
83#### relativeUrls
84Type: `boolean`
85Default: false
86
87Rewrite urls to be relative. False: do not modify urls.
88
89#### report
90Choices: `false` `'min'` `'gzip'`
91Default: `false`
92
93Either do not report anything, report only minification result, or report minification and gzip results. This is useful to see exactly how well Less is performing, but using `'gzip'` can add 5-10x runtime task execution.
94
95Example ouput using `'gzip'`:
96
97```
98Original: 198444 bytes.
99Minified: 101615 bytes.
100Gzipped:  20084 bytes.
101```
102
103### Usage Examples
104
105```js
106less: {
107  development: {
108    options: {
109      paths: ["assets/css"]
110    },
111    files: {
112      "path/to/result.css": "path/to/source.less"
113    }
114  },
115  production: {
116    options: {
117      paths: ["assets/css"],
118      yuicompress: true
119    },
120    files: {
121      "path/to/result.css": "path/to/source.less"
122    }
123  }
124}
125```
126
127## Release History
128
129 * 2013-08-08   v0.6.5   Support strictMath option Support rootpath parse option
130 * 2013-07-09   v0.6.4   Support relativeUrls option
131 * 2013-07-06   v0.6.3   Add report option for minification and gzip results
132 * 2013-07-03   v0.6.2   support syncImport
133 * 2013-06-12   v0.6.1   Support ieCompat
134 * 2013-06-09   v0.6.0   Bump less to 1.4.0
135 * 2013-05-23   v0.5.2   Improve error handling.
136 * 2013-04-25   v0.5.1   Gracefully handle configuration without sources.
137 * 2013-02-15   v0.5.0   First official release for Grunt 0.4.0.
138 * 2013-01-23   v0.5.0rc7   Updating grunt/gruntplugin dependencies to rc7. Changing in-development grunt/gruntplugin dependency versions from tilde version ranges to specific versions. Remove experimental wildcard destination support. Switching to this.files api.
139 * 2012-10-18   v0.3.2   Add support for dumpLineNumbers.
140 * 2012-10-12   v0.3.1   Rename grunt-contrib-lib dep to grunt-lib-contrib.
141 * 2012-09-24   v0.3.0   Global options depreciated Revert normalize linefeeds.
142 * 2012-09-16   v0.2.2   Support all less options Normalize linefeeds Default path to dirname of src file.
143 * 2012-09-10   v0.2.0   Refactored from grunt-contrib into individual repo.
144
145---
146
147Task submitted by [Tyler Kellen](http://goingslowly.com/)
148
149*This file was generated on Thu Aug 08 2013 09:12:41.*
Note: See TracBrowser for help on using the repository browser.