reisraff/phulp-less-compiler

Compile your less files

1.1.0 2018-03-15 15:33 UTC

This package is auto-updated.

Last update: 2024-11-28 04:20:38 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' => '../../'
]);