2017 © Pedro Peláez
 

library less-slim-middleware

Slim Framework middleware to compile LESS CSS files on-the-fly. Supports minification and caching.

image

hellogerard/less-slim-middleware

Slim Framework middleware to compile LESS CSS files on-the-fly. Supports minification and caching.

  • Wednesday, June 4, 2014
  • by hellogerard
  • Repository
  • 4 Watchers
  • 22 Stars
  • 422 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 1 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

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

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., (*2)

Usage

  • src - Directory to look for LESS files. REQUIRED Example: if src is set to /path/to/public, and a request for http://mysite.com/css/style.css is received, then it will look for a LESS file in /path/to/public/css/style.less.
  • cache - Cache CSS file to filesystem. Default is true.
  • cache.dir - Directory for the cached CSS file. Default is src.
  • minify - Minify the CSS output. Default is true.
  • debug - Send debug messages to Slim Logger. Default is false.

Example:, (*3)


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 )));

The Versions

04/06 2014

dev-master

9999999-dev https://github.com/hellogerard/less-slim-middleware

Slim Framework middleware to compile LESS CSS files on-the-fly. Supports minification and caching.

  Sources   Download

MIT

The Requires

 

middleware less slimphp

04/06 2014

v0.1.0

0.1.0.0 https://github.com/hellogerard/less-slim-middleware

Slim Framework middleware to compile LESS CSS files on-the-fly. Supports minification and caching.

  Sources   Download

MIT

The Requires

 

middleware less slimphp

07/10 2013

v0.0.3

0.0.3.0 https://github.com/hellogerard/less-slim-middleware

Slim Framework middleware to compile LESS CSS files on-the-fly. Supports minification and caching.

  Sources   Download

MIT

The Requires

 

middleware less slimphp

08/07 2013

v0.0.2

0.0.2.0 https://github.com/hellogerard/less-slim-middleware

Slim Framework middleware to compile LESS CSS files on-the-fly. Supports minification and caching.

  Sources   Download

MIT

The Requires

 

08/05 2013

v0.0.1

0.0.1.0 https://github.com/hellogerard/less-slim-middleware

Slim Framework middleware to compile LESS CSS files on-the-fly. Supports minification and caching.

  Sources   Download

MIT

The Requires