PHPackages                             bradcrumb/lesscompiler - 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. bradcrumb/lesscompiler

ActiveCakephp-plugin[Utility &amp; Helpers](/categories/utility)

bradcrumb/lesscompiler
======================

CakePHP LessCompiler

1.2.0(11y ago)4791[2 issues](https://github.com/BradCrumb/lesscompiler/issues)[1 PRs](https://github.com/BradCrumb/lesscompiler/pulls)GPL-3.0PHPPHP &gt;=5.3.0

Since Sep 1Pushed 11y ago1 watchersCompare

[ Source](https://github.com/BradCrumb/lesscompiler)[ Packagist](https://packagist.org/packages/bradcrumb/lesscompiler)[ Docs](https://github.com/BradCrumb/lesscompiler)[ RSS](/packages/bradcrumb-lesscompiler/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (5)Dependencies (1)Versions (4)Used By (0)

LessCompiler
============

[](#lesscompiler)

LessCompiler is a CakePHP LESS component to (automatically) compile less-files () by using less.php ().

Requirements
------------

[](#requirements)

The master branch has the following requirements:

- CakePHP 2.2.0 or greater.
- PHP 5.3.0 or greater.

Installation
------------

[](#installation)

- Clone/Copy the files in this directory into `app/Plugin/LessCompiler`
- Ensure the plugin is loaded in `app/Config/bootstrap.php` by calling `CakePlugin::load('LessCompiler');`
- Include the Less component in your `AppController.php`:
    - `public $components = array('LessCompiler.Less');`

Documentation
-------------

[](#documentation)

The component will check for less-files to (re)compile automatically when:

- Debug level is &gt; 0
- autoRun is set to true in the component settings
- Cache-time expires

In a live environment one can force the component to (re)compile all less-files by supplying forceLessToCompile=true in the request string.

The component writes cache-files to your CakePHP's cache-directory in a subdirectory called "LessComponent". All less-files should be placed in the `app/less` directory (to generate css-files in the default `webroot/css` directory). Less-files for the plugin and themes should be stored in `app/Plugin/{pluginname}/less` or `app/View/Themed/{themename/less`.

The default duration time for the cache is 4 hours. After that time the cache expires and after a new request the component will check for updated or added less-files.

### Possible Component Settings

[](#possible-component-settings)

```
public $components = array(
	'LessCompiler.less' 	=> array(
		'sourceFolder' 		=> 'less', 			// Where to look for LESS files, (From the APP directory)
   		'targetFolder' 		=> false, 			// Where to put the generated css (From the webroot directory)
		'formatter' 		=> 'compressed',	// lessphp compatible formatter
		'variables' 		=> array(),			// Pass variables from php to LESS
		'forceCompiling' 	=> false,			// Always recompile
		'autoRun' 			=> false,			// Check if compilation is necessary, this ignores the CakePHP Debug setting
		'sourceMap'			=> false			// Generate sourcemap
	)
);

```

License
-------

[](#license)

GNU General Public License, version 3 (GPL-3.0)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~135 days

Total

3

Last Release

4367d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/376972f1f11ca42dbb67dc764af57d7c051d18d69e67a8ccb7c1018b06ad3d77?d=identicon)[BradCrumb](/maintainers/BradCrumb)

---

Top Contributors

[![BradCrumb](https://avatars.githubusercontent.com/u/4476936?v=4)](https://github.com/BradCrumb "BradCrumb (19 commits)")

---

Tags

cakephplesscompilercomponent

### Embed Badge

![Health badge](/badges/bradcrumb-lesscompiler/health.svg)

```
[![Health](https://phpackages.com/badges/bradcrumb-lesscompiler/health.svg)](https://phpackages.com/packages/bradcrumb-lesscompiler)
```

###  Alternatives

[markstory/asset_compress

An asset compression plugin for CakePHP. Provides file concatenation and a flexible filter system for preprocessing and minification.

3761.0M11](/packages/markstory-asset-compress)[markstory/mini-asset

An asset compression library. Provides file concatenation and a flexible filter system for preprocessing and minification.

66741.1k3](/packages/markstory-mini-asset)[ishanvyas22/asset-mix

Asset Mix plugin for CakePHP

3375.4k2](/packages/ishanvyas22-asset-mix)[trentrichardson/cakephp-shrink

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

1619.3k](/packages/trentrichardson-cakephp-shrink)[baldwin/magento2-module-less-js-compiler

Allows Magento 2 to compile less files using the less nodejs compiler

2348.6k](/packages/baldwin-magento2-module-less-js-compiler)[tigrang/cakephp-datatable

CakePHP DataTable Plugin

465.1k](/packages/tigrang-cakephp-datatable)

PHPackages © 2026

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