Skip to content
Node module enabling LESS requires for webant
JavaScript CSS
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
test
.gitignore
.npmignore
.travis.yml
LICENSE
README.md
package.json

README.md

node-modules-webant-handler-less

Require LESS files with webant

Installation

$ npm install webant-handler-less

Usage

Ensure the less handler is present in your webant configuration file. For example:

{
    "entry":"src/js/main.js",
    "dest":"build/main.js",
    "handlers":["less"]
}

You may now require LESS files:

// Get the compiled CSS.
var css = require("../path/to/styles.less");

// Apply the CSS to the document.
document.head.innerHTML += '<style type="text/css">' + css + '</style>';

See the webant module for more information.

Settings

compress

Can be either true or false (default). Controls whether the compiled CSS is compressed.

Tests Build Status

Ensure phantomjs is installed and in your PATH, then run:

$ npm test
Something went wrong with that request. Please try again.