PHPackages                             fredjuvaux/silex-less-provider - 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. fredjuvaux/silex-less-provider

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

fredjuvaux/silex-less-provider
==============================

Simple less php service provider for Silex

2.0.x-dev(11y ago)162711MITPHPPHP &gt;=5.5.9

Since May 31Pushed 11y ago1 watchersCompare

[ Source](https://github.com/fredjuvaux/silex-less-provider)[ Packagist](https://packagist.org/packages/fredjuvaux/silex-less-provider)[ Docs](https://github.com/fredjuvaux/silex-less-provider)[ RSS](/packages/fredjuvaux-silex-less-provider/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (2)Used By (1)

Less Service Provider for Silex
===============================

[](#less-service-provider-for-silex)

Simple less php service provider for Silex that uses  as parser.

You'll find the following topics in this README:

- [Dependencies](#dependencies)
- [Installation](#installation)
- [Configuration](#configuration)
- [Usage](#usage)

Dependencies
------------

[](#dependencies)

- [Silex](http://silex.sensiolabs.org/)
- PHP 5.3.2 and above
- [LESS compiler written in PHP](https://github.com/leafo/lessphp)

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

[](#installation)

You basically have three options to add this extension to your Silex project. We'd strongly recommend the first option!

### composer.json

[](#composerjson)

```
php composer.phar require fredjuvaux/silex-less-provider dev-master
```

Or add to the dependencies in your projects composer.json file and update your dependencies::

```
"fredjuvaux/silex-less-provider": "dev-master"
```

```
php composer.phar update
```

This is by far the easiest way, since it automatically adds the Doctrine dependencies and adds everything to the autoloading mechanism supplied by Composer.

More information on Composer can be found on [getcomposer.org](http://getcomposer.org/).

### Git

[](#git)

Another option is to clone the project:

```
cd /path/to/your_project/vendor
git clone git@github.com:fredjuvaux/silex-less-provider.git
```

Or you can add it as a submodule if your project is in a git repository too:

```
cd /path/to/your_project
git submodule add git@github.com:fredjuvaux/silex-less-provider.git
```

This will require you to manually install all the dependencies. Also note that you'll need to add the provider to the Silex autoloader (or whatever autoloading mechanism) by hand. More on both subjects can be found below.

### Download an archive

[](#download-an-archive)

GitHub also gives you the option to [download an ZIP-archive](https://github.com/fredjuvaux/silex-less-provider/zipball/master), which you can extract in your vendor folder. This method will also require you to manually install all the dependencies and add everything to your autoloader.

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

[](#configuration)

Registering the Less Service Provider is rather straight forward:

```
