reisraff/phulp-less-compiler

Compile your less files

1.1.0 2018-03-15 15:33 UTC

This package is auto-updated.

Last update: 2020-10-07 16:34:45 UTC


README

The less-compiler addon for PHULP. It's a wrapper for less.php.

Install

$ composer require reisraff/phulp-less-compiler

Usage

<?php

use Phulp\LessCompiler\LessCompiler;

$phulp->task('less', function ($phulp) {
    $phulp->src(['src/'], '/css$/')
        // compile
        ->pipe(new LessCompiler)
        // write your compiled files
        ->pipe($phulp->dest('dist/'));
});

Options

URI : The uri root to prepend to any relative image or @import urls in the .less file.

<?php

use Phulp\LessCompiler\LessCompiler;

$compiler = new LessCompiler([
    // default: null
    'uri' => '../../'
]);