2017 © Pedro Peláez
 

cakephp-plugin lesscompiler

CakePHP LessCompiler

image

bradcrumb/lesscompiler

CakePHP LessCompiler

  • Friday, May 30, 2014
  • by BradCrumb
  • Repository
  • 1 Watchers
  • 4 Stars
  • 69 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 2 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

LessCompiler

LessCompiler is a CakePHP LESS component to (automatically) compile less-files (http://lesscss.org/) by using less.php (https://github.com/oyejorge/less.php)., (*1)

Requirements

The master branch has the following requirements:, (*2)

  • CakePHP 2.2.0 or greater.
  • PHP 5.3.0 or greater.

Installation

  • Clone/Copy the files in this directory into app/Plugin/LessCompiler
  • Ensure the plugin is loaded in app/Config/bootstrap.php by calling CakePlugin::load('LessCompiler');
  • Include the Less component in your AppController.php:
    • public $components = array('LessCompiler.Less');

Documentation

The component will check for less-files to (re)compile automatically when: * Debug level is > 0 * autoRun is set to true in the component settings * Cache-time expires, (*3)

In a live environment one can force the component to (re)compile all less-files by supplying forceLessToCompile=true in the request string., (*4)

The component writes cache-files to your CakePHP's cache-directory in a subdirectory called "LessComponent". All less-files should be placed in the app/less directory (to generate css-files in the default webroot/css directory). Less-files for the plugin and themes should be stored in app/Plugin/{pluginname}/less or app/View/Themed/{themename/less., (*5)

The default duration time for the cache is 4 hours. After that time the cache expires and after a new request the component will check for updated or added less-files., (*6)

Possible Component Settings

public $components = array(
    'LessCompiler.less'     => array(
        'sourceFolder'      => 'less',          // Where to look for LESS files, (From the APP directory)
        'targetFolder'      => false,           // Where to put the generated css (From the webroot directory)
        'formatter'         => 'compressed',    // lessphp compatible formatter
        'variables'         => array(),         // Pass variables from php to LESS
        'forceCompiling'    => false,           // Always recompile
        'autoRun'           => false,           // Check if compilation is necessary, this ignores the CakePHP Debug setting
        'sourceMap'         => false            // Generate sourcemap
    )
);

License

GNU General Public License, version 3 (GPL-3.0) http://opensource.org/licenses/GPL-3.0, (*7)

The Versions

30/05 2014

dev-master

9999999-dev https://github.com/BradCrumb/lesscompiler

CakePHP LessCompiler

  Sources   Download

GPL-3.0

The Requires

 

by Patrick Langendoen

component cakephp less compiler

30/05 2014

1.2.0

1.2.0.0 https://github.com/BradCrumb/lesscompiler

CakePHP LessCompiler

  Sources   Download

GPL-3.0

The Requires

 

by Patrick Langendoen

component cakephp less compiler

02/09 2013

1.1.2

1.1.2.0 https://github.com/BradCrumb/lesscompiler

CakePHP LessCompiler

  Sources   Download

GPL-3.0

The Requires

 

by Patrick Langendoen

component cakephp less compiler

01/09 2013

1.1.1

1.1.1.0 https://github.com/BradCrumb/lesscompiler

CakePHP LessCompiler

  Sources   Download

GPL-3.0

The Requires

 

by Patrick Langendoen

component cakephp less compiler