Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Easier grunt task to compile Less to CSS
JavaScript
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
tasks
LICENSE
README.md
package.json

README.md

grunt-easy-less

This is

Grunt task to compile Less to CSS.

This just has very simple feature, then can be used with less writing. If you want to configrue options more, use grunt-contrib-less, awesome grunt task as official.

Install

npm install grunt-easy-less

The simplest example

The simplest way to add task.

grunt.loadNpmTasks("grunt-easy-less");

grunt.initConfig({
    ezless : {
        options : {
            lessPath : "./assets/less",
            cssPath : "./assets/css"
        }
    }
});

ezless search the *.less files in ./assets/less (not recursively), compile them to css, and save as the same name in ./assets/css directory.

For example, if you have Less files in lessPath as below,

assets/
    less/
        foo.less
        bar.less

Compiled css file will be saved as below.

assets/
    css/
        foo.css
        bar.css

Specify the files to compile

If you want to specify the less file to compile, or want to compile the less files in sub-directories, use less option.

grunt.initConfig({
    ezless : {
        options : { ... },
        less : [
            "foo.less",
            "path/to/bar.less"
        ]
    }
});

The path must be relative from options.lessPath. If less list is not blank, files not specified in the list will be ignored.

Options

  • lessPath : String ("less") - The path to less directory
  • cssPath : String ("css") - The path to css directory
  • verbose : Boolean (true) - Show the message log or not
  • compress : Boolean (true) - Compress the css file or not

Author

mach3

Something went wrong with that request. Please try again.