UNPKG

less-tests

Version:

LESS CSS test-suite. Run any kind of test on LESS stylesheets.

125 lines (84 loc) 3.29 kB
### Custom Options > Options developed specifically for the `assemble-less` plugin #### lessrc Type: `String` Default value: `null` A convenience option for externalizing task options into a `.lessrc` file. If this file is specified, options defined therein will be used. ``` javascript less: { options: grunt.file.readJSON('.lessrc') } ``` The `.lessrc` file must be valid JSON and looks something like this: ``` json { "require": null, "concat": false, "compress": false, "yuicompress": false, "optimization": 03, "strictImports": true, "dumpLineNumbers": false, "strictMaths": false, "strictUnits": false } ``` #### require Type: `String|Array` Default: _empty string_ Specified files will be _prepended_ to the beginning of src files, **_not_** to the concatenated output. This feature is useful for "inlining" globaly-required LESS files, such as `variables` or `mixins`, so that _they do not need to be referenced with `@import` statements inside any individual files_. #### concat Type: `Boolean` Default: _true_ Concatenate all source files by default. If you change the value to false, all source files will compile into individual files. #### version Type: `String` Default: _less_ Specify the version of Less.js that you wish to use for compiling to CSS. Useful for testing. #### globals (under consideration) Type: `Object` Default: _null_ Data object for defining global variables inside the Gruntfile which will be accessible in LESS files. ### Standard Options > These options will be passed through directly to [Less.js](http://github.com/cloudhead/less.js) See the [Less.js documentation](http://github.com/cloudhead/less.js) for more info about supported options. #### paths Type: `String|Array` Default: _Directory of input files_ Specifies directories to scan for `@import` directives when parsing. The default value is the directory of the specified source files. In other words, the `paths` option allows you to specify paths for your @import statements in the `less` task, as an alternative to specifying a path on every `@import` statement that appears throughout your LESS files. So instead of doing this: ``` css @import "path/to/my/less/files/mixins/mixins.less"; ``` you can do this: ``` css @import "mixins.less"; ``` #### compress Type: `Boolean` Default: _false_ Specifies if we should compress the compiled css by removing some whitespaces. #### yuicompress Type: `Boolean` Default: _false_ Compress output using cssmin.js. #### optimization Type: `Integer` Default: null Set 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. #### strictImports Type: `Boolean` Default: _false_ Force evaluation of imports. #### strictMaths Type: `Boolean` Default: _true_ Force operations to be enclosed within parenthesis, `(2 / 6)`. #### strictUnits Type: `Boolean` Default: _true_ Force strict evaluation of units. If set to `false` the compiler will not throw an error with operations such as `(3 * 1em)`. #### dumpLineNumbers Type: `String` Default: _false_ Configures `-sass-debug-info` support. Accepts following values: `comments`, `mediaquery`, `all`. ---