PHPackages                             hellogerard/less-slim-middleware - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. hellogerard/less-slim-middleware

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

hellogerard/less-slim-middleware
================================

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

v0.1.0(12y ago)219644[1 issues](https://github.com/hellogerard/less-slim-middleware/issues)MITPHPPHP &gt;=5.3.0

Since May 8Pushed 12y ago3 watchersCompare

[ Source](https://github.com/hellogerard/less-slim-middleware)[ Packagist](https://packagist.org/packages/hellogerard/less-slim-middleware)[ Docs](https://github.com/hellogerard/less-slim-middleware)[ RSS](/packages/hellogerard-less-slim-middleware/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (3)Dependencies (3)Versions (5)Used By (0)

This [Slim Framework](http://slimframework.com/) middleware will compile [LESS CSS](http://lesscss.org) files on-the-fly using the [`Assetic`](https://github.com/kriswallsmith/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`](https://github.com/emberfeather/less.js-middleware).

### Usage

[](#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:

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

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~130 days

Total

4

Last Release

4409d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/200488?v=4)[Gerard Sychay](/maintainers/hellogerard)[@hellogerard](https://github.com/hellogerard)

---

Top Contributors

[![hellogerard](https://avatars.githubusercontent.com/u/200488?v=4)](https://github.com/hellogerard "hellogerard (8 commits)")[![bitdeli-chef](https://avatars.githubusercontent.com/u/3092978?v=4)](https://github.com/bitdeli-chef "bitdeli-chef (1 commits)")

---

Tags

middlewarelessslimphp

### Embed Badge

![Health badge](/badges/hellogerard-less-slim-middleware/health.svg)

```
[![Health](https://phpackages.com/badges/hellogerard-less-slim-middleware/health.svg)](https://phpackages.com/packages/hellogerard-less-slim-middleware)
```

###  Alternatives

[scssphp/scssphp

scssphp is a compiler for SCSS written in PHP.

62929.3M291](/packages/scssphp-scssphp)[league/uri-components

URI components manipulation library

31937.4M89](/packages/league-uri-components)[wikimedia/less.php

PHP port of the LESS processor

12328.7M118](/packages/wikimedia-lessphp)[trentrichardson/cakephp-shrink

Compiles, combines, and minifies javascript, coffee, less, scss, and css

1619.4k](/packages/trentrichardson-cakephp-shrink)[zizaco/lessy

Lessy is a simple and lean LESS compiler for Laravel

2116.7k](/packages/zizaco-lessy)[mmanos/laravel-casset

An asset management package for Laravel 4.

102.6k](/packages/mmanos-laravel-casset)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
