PHPackages                             rickkuipers/justless - 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. rickkuipers/justless

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

rickkuipers/justless
====================

ZF2 module that allows automation of compiling your LESS with the extra of minifying the files.

1.0.2(12y ago)620.3k↓56%1MITPHPPHP &gt;=5.3.3

Since Apr 26Pushed 12y ago1 watchersCompare

[ Source](https://github.com/rskuipers/JustLess)[ Packagist](https://packagist.org/packages/rickkuipers/justless)[ Docs](https://github.com/rskuipers/JustLess)[ RSS](/packages/rickkuipers-justless/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (2)Versions (4)Used By (0)

JustLess
========

[](#justless)

ZF2 module that allows automation of compiling your LESS with the extra of minifying the files. A view helper is available which expects a .less file as a parameter and will compile and possibly minify it returning the filename of the compiled file.

### Why JustLess?

[](#why-justless)

First of all I like automating my workflow, if I can skip the step of compiling and minifying through automation then I will! Second of all, the existing modules that I found were entire Asset Managers, but all I wanted was LESS compilation and minification. That's why I made JustLess.

Features
--------

[](#features)

- Compile LESS to CSS on the fly
- Automatically minify the result
- Compilated files are cached using file modified time.

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

[](#installation)

1. Add the module to your composer.json (or use composer cli)

    ```
    "require": {
        "rickkuipers/justless": "~1.0.0"
    }
    ```
2. Run composer update: `php composer.phar update`
3. Enable the module in application.config.php

    ```
    return array(
      'modules' => array(
        /*...*/
        'JustLess',
        /*...*/
      ),
    );
    ```
4. Copy the file from `/vendor/rickkuipers/justless/config/justless.global.php.dist` to `/config/autoload/justless.global.php`
5. Edit the config to match your preferred configuration
6. Make sure the `destination_dir` is writable (`chmod -R 0777 css/`).

Usage
-----

[](#usage)

`$this->less($file, $minify)` first parameter is the .less file, second parameter is optional if you want to override the default configuration of minifying the css.

```
