Home

Awesome

This Slim Framework middleware will compile LESS CSS files on-the-fly using the Assetic library. It supports minification and caching, also via Assetic.

It will intercept requests for CSS files and attempt to find a corresponding LESS file. If one is found, it will compile the file to CSS and serve it, optionally saving the CSS to a filesystem cache. Inspired by less.js-middleware.

Usage

Example:


use \Slim\Slim;
use \Slim\Middleware\Less;

$app = new Slim();
$app->add(new Less(array(
    'src' => '/path/to/public',
    'cache' => true,
    'cache.dir' => '/path/to/cache',
    'minify' => true,
    'debug' => false
)));