<commit_before># grunt-less-themes [![Build Status](https://travis-ci.org/hollandben/grunt-less-themes.png?branch=master)](https://travis-ci.org/hollandben/grunt-less-themes)

> Compile multiple themed LESS files to CSS.

## Getting Started
This plugin requires Grunt `~0.4.0`

If 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:

```shell
npm install grunt-less-themes --save-dev
```

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

```js
grunt.loadNpmTasks('grunt-less-themes');
```

*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).

## less-themes task
_Run this task with the `grunt lessThemes` command._

Task targets, files and options may be specified according to the grunt [Configuring tasks](http://gruntjs.com/configuring-tasks) guide.

### Options

This task is an extension of the [grunt-contrib-less](https://github.com/gruntjs/grunt-contrib-less) task. The options from that task are also compatible with this one.

#### output
Type: `String`
Default: 'generated'

This option defines the output directory for the `grunt-less-theme` task.

#### themeDir
Type: `String`
Default: 'themes'

This option defines the directory where all the themes are hosted

#### themes
Type: `Array`

This option provides the `grunt-less-themes` task with the names of each theme. This name is used to in finding the theme and in the generated file.

#### placeholder
Type: `String`
Default: '{{theme}}'

This option is the placeholder string used in the output CSS filename. The name of each theme will replace this placeholder.

#### themeImport
Type: `String`
Default: 'theme'

This option is the name of the theme file that is imported into each LESS file for compilation.


### Usage Examples

#### Simple

```js
lessThemes: {
    dev: {
        options: {
            output: 'path/to/outpu'
        },
        files: {
            'example_{{themeName}}.css': 'simple.less'<commit_msg>Fixed typo<commit_after># grunt-less-themes [![Build Status](https://travis-ci.org/hollandben/grunt-less-themes.png?branch=master)](https://travis-ci.org/hollandben/grunt-less-themes)

> Compile multiple themed LESS files to CSS.

## Getting Started
This plugin requires Grunt `~0.4.0`

If 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:

```shell
npm install grunt-less-themes --save-dev
```

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

```js
grunt.loadNpmTasks('grunt-less-themes');
```

*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).

## less-themes task
_Run this task with the `grunt lessThemes` command._

Task targets, files and options may be specified according to the grunt [Configuring tasks](http://gruntjs.com/configuring-tasks) guide.

### Options

This task is an extension of the [grunt-contrib-less](https://github.com/gruntjs/grunt-contrib-less) task. The options from that task are also compatible with this one.

#### output
Type: `String`
Default: 'generated'

This option defines the output directory for the `grunt-less-theme` task.

#### themeDir
Type: `String`
Default: 'themes'

This option defines the directory where all the themes are hosted

#### themes
Type: `Array`

This option provides the `grunt-less-themes` task with the names of each theme. This name is used to in finding the theme and in the generated file.

#### placeholder
Type: `String`
Default: '{{theme}}'

This option is the placeholder string used in the output CSS filename. The name of each theme will replace this placeholder.

#### themeImport
Type: `String`
Default: 'theme'

This option is the name of the theme file that is imported into each LESS file for compilation.


### Usage Examples

#### Simple

```js
lessThemes: {
    dev: {
        options: {
            output: 'path/to/output'
        },
        files: {
            'example_{{themeName}}.css': 'simple.less'
{'fraction_non_alphanumeric': 0.11363636363636363, 'fraction_numerical': 0.004629629629629629, 'mean_word_length': 4.110752688172043, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6212719', 'n_tokens_mistral': 1456, 'n_tokens_neox': 1399, 'n_words': 552}