lessmagic

LESS CSS middleware.

npm install lessmagic
12 downloads in the last week
24 downloads in the last month

Build Status

lessmagic

lessmagic is here to make using LESS CSS LESS of a pain. (pardon the pun) It is a Connect/Union middleware and Flatiron plugin that serves autogenerated .css files from your .less files.

Where do I get this awesomeness?

Why, npm of course!

npm install lessmagic

How do I use this awesomeness?

Well, you just use it as middleware!

with Express:

var http = require('http');
var express = require('express');
var lessmagic = require('lessmagic');

var app = express();

app.use(lessmagic(__dirname + '/markup'));
app.use(express.static(__dirname + '/public'));

http.createServer(app).listen(3000);

Or with Flatiron, as a Broadway plugin:

var flatiron = require('flatiron');
var lessmagic = require('lessmagic');

var app = flatiron.app;
app.use(flatiron.plugins.http);

app.use(lessmagic, __dirname + '/markup');
app.use(flatiron.plugins.static, __dirname + '/public');

app.start(3000);

There's also a bunch of examples for other frameworks.

lessmagic(opts)

lessmagic(path, opts)

Returns the lessmagic middleware. opts will be passed along to the less.Parser. If path is given, it is prepended to opts.paths.

I think this could be awesomer!

Awesome, open an issue! If you're really awesome, send me a pull request!

How do the insides of this thing work?

Check out the docco docs at http://nathan7.github.com/node-lessmagic/ or read the source!

npm loves you