Skip to content
This repository was archived by the owner on Jan 16, 2019. It is now read-only.

cakebake/php-lesscss-compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP LessCss Compiler

Compiles less code to css code. Generating static css, or dynamic php file which outputs css... the use depends on your ideas and the project requirements! ;)

Features

  • Compiles less to css code with oyejorge/less.php lib (Bootstrap 3 support)
  • Caching
  • Observes the less files to changes and generates only when necessary
  • Minify (optional)
  • Output CSS and/or write Stylesheet file

Install via Composer

If you do not have Composer, you may install it by following the instructions at getcomposer.org.

You can then install the package using the following command:

php composer.phar require --prefer-dist cakebake/php-lesscss-compiler "*"

or add

"cakebake/php-lesscss-compiler": "*"

to the require section of your composer.json file and run php composer.phar update.

Usage Example

For more options see source code comments in file src/LessConverter.php.

$less = new \cakebake\lesscss\LessConverter();
$less->init([
    [
        'input' => __DIR__ . '/example-1.less',
        'webFolder' => '../tests',
    ],
    [
        'input' => __DIR__ . '/example-2.less',
        'webFolder' => '../tests',
    ],
], __DIR__ . '/css/output.css');

About

Compiles less code to css code

Resources

License

Stars

Watchers

Forks

Packages

No packages published