PHPackages                             cypresslab/less-elephant-bundle - 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. cypresslab/less-elephant-bundle

AbandonedSymfony-bundle[Utility &amp; Helpers](/categories/utility)

cypresslab/less-elephant-bundle
===============================

Integrates LessElephant into Symfony2

135.7k2PHP

Since Nov 25Pushed 13y ago2 watchersCompare

[ Source](https://github.com/matteosister/LessElephantBundle)[ Packagist](https://packagist.org/packages/cypresslab/less-elephant-bundle)[ RSS](/packages/cypresslab-less-elephant-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

LessElephantBundle [![Travis build status](https://camo.githubusercontent.com/7774d52686d68a5ae7471156e5bb7302ff89613efc7c88e222f67d5052e1d952/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f6d617474656f7369737465722f4c657373456c657068616e7442756e646c652e706e67)](https://camo.githubusercontent.com/7774d52686d68a5ae7471156e5bb7302ff89613efc7c88e222f67d5052e1d952/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f6d617474656f7369737465722f4c657373456c657068616e7442756e646c652e706e67)\#
=========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#lesselephantbundle-)

A Bundle to use the [LessElephant](https://github.com/matteosister/LessElephant) library in a Symfony2 project.

This bundle scans your [less projects](http://lesscss.org/) on every request, and checks if they needs to be recompiled. It takes care of dependencies, so you can use less with **@import** without problems. You don't need javascript or manual excution of **lessc** anymore

[Installation](https://github.com/matteosister/LessElephantBundle/blob/master/Resources/docs/installation.md)

[Integrate bootstrap in Symfony2 and compile less on the fly](https://github.com/matteosister/LessElephantBundle/blob/master/Resources/docs/bootstrap.md)

Configuration
-------------

[](#configuration)

**Add the configuration in your config file (for the dev environment)**

*app/config\_dev.yml*

```
cypress_less_elephant:
    less_binary_path: "/usr/local/bin/lessc"
    less_projects:
        my-first-project:
            source_folder: %kernel.root_dir%/../src/Cypress/DemoBundle/Resources/public/bootstrap/less
            source_file: bootstrap.less
            destination_css: %kernel.root_dir%/../src/Cypress/DemoBundle/Resources/public/bootstrap/css/bootstrap.css
        another-project:
            .....
    force_compile: ~

```

**less\_binary\_path** (optional) is the path to your lessc binary. LessElephant try to find it with "which lessc". So, if you are on windows, you need this

**less\_projects** (at least 1) define an entry for each of your less projects. All three parameters are mandatory

- *source\_folder* the folder where all your less files resides
- *source\_file* the main less file. Usually this is a file that contains many *@import* directive
- *destination\_css* the destination css. **This file needs to be writable by web server user** (for example on linux *www-data*)

**force\_compile** (optional) default: false. If it is true, we force the compilation for each request.

**Add the stylesheets to your templates**

*assetic*

```
{% stylesheets filter="yui_css"
    "@CypressDemoBundle/Resources/public/bootstrap/css/bootstrap.css" %}

{% endstylesheets %}
```

*without assetic*

```

```

Enjoy!

How it works
------------

[](#how-it-works)

This bundle register an event listener that, on every request, check if the projects defined in the config\_dev.yml files are in "clean" state or needs recompile.

If the project do not need to be recompiled, it adds a really small overhead to symfony, just the time to check a bunch of files.

Read the [LessElephant readme](https://github.com/matteosister/LessElephant) for other useful informations

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 78.1% 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/212723?v=4)[Matteo Giachino](/maintainers/matteosister)[@matteosister](https://github.com/matteosister)

---

Top Contributors

[![matteosister](https://avatars.githubusercontent.com/u/212723?v=4)](https://github.com/matteosister "matteosister (25 commits)")[![smoya](https://avatars.githubusercontent.com/u/1083296?v=4)](https://github.com/smoya "smoya (7 commits)")

### Embed Badge

![Health badge](/badges/cypresslab-less-elephant-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/cypresslab-less-elephant-bundle/health.svg)](https://phpackages.com/packages/cypresslab-less-elephant-bundle)
```

###  Alternatives

[maba/webpack-bundle

Bundle to Integrate Webpack to Symfony

123268.2k4](/packages/maba-webpack-bundle)[bueltge/must-use-loader

Load Must-Use Plugins inside subdirectories with caching. For delete the cache: if you view the Must Use plugin list in the network administration.

6115.7k2](/packages/bueltge-must-use-loader)

PHPackages © 2026

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