2017 © Pedro PelĂĄez
 

library bc_zf-less-compiler

A LessCompiler Module for ZF2

image

bradcrumb/bc_zf-less-compiler

A LessCompiler Module for ZF2

  • Monday, January 4, 2016
  • by BradCrumb
  • Repository
  • 1 Watchers
  • 0 Stars
  • 3,150 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 5 Versions
  • 4 % Grown

The README.md

ZendFramework2+ LessCompiler

A module for Zend Framework 2+ to easily compile all of your Less-files by using and extending the Less.PHP Compiler of http://lessphp.gpeasy.com/., (*1)

Requirements

This module has the following requirements:, (*2)

  • PHP 5.3.0 or greater.
  • ZendFramework 2.2 or greater
  • Less.PHP Compiler in the vendor map (default git clone will do, or with composer) 1.7.0 or greater

Installation

Composer

php composer.phar require  bradcrumb/bc_zf-less-compiler

Or clone the repository

git clone https://github.com/BradCrumb/BC_ZFLessCompiler.git

Load Module

  • Make your application aware of the module by add the module's name to the application.config.php file. ie. return array( // This should be an array of module namespaces used in the application. 'modules' => array( 'Application', 'BC_ZFLessCompiler', ), );
  • Unless you want to set some custom configuration youÂŽre good to go now

Configuration

Since ZF2 is no longer environment aware, so isn't this module. In de module's configuration folder you'll find a file called 'lesscompiler.global.php.dist'. To configure the LessCompiler to your needs you'll have the copy the file to the application's config/autoload folder en remove the .dist extension. Read the ZF documentation on how to use the naming conventions regarding configuration files. ie. global could also be local., (*3)

An example of the options you can configure can be found in module.config.php, (*4)

The options are - enable (default:true) Should the module be enabled or disabled for the current environment, (*5)

  • autoRun (default: false) Always compile the Less files (ignores the enabled option), (*6)

  • pathToLessphp (default: vendor/oyejorge/less.php/lib/Less) Set the path for the Less.PHP files Defaults to "less.php" in the application's vendor map, (*7)

  • importDir (default: null) Import directory: please use realpath(...) to get a valid directory ie. realpath(getcwd() . '/less/inc/');, (*8)

  • sourceFolder (default: null) Where to look for Less files, (*9)

  • targetFolder (default: null) Where to put the generated css, (*10)

  • formatter (default: compressed) lessphp compatible formatter (see leafo.net/lessphp for the options), (*11)

  • preserveComments (default: null) Preserve comments or remove them, (*12)

  • variables (default: array()) Array of php variables (see leafo.net/lessphp for more info), (*13)

  • cache (default: null) Pass cache options as an array or pass even a complete cache adapter which extends \Zend\Cache\Storage\Adapter\AbstractAdapter Configurable array options are the keys: name, ttl and namespace. Other array_keys will be ignored, (*14)

Documentation

The module will check for less-files to (re)compile automatically when: * autoRun is set to true in the configuration options * you supply a GET parameter "forceCompiling" and set "true" or 1 * Cache-time expires, (*15)

The module caches the compiled files with the help of Zend_Cache. All Less-files should be placed in the application/less directory (to generate css-files in the default public/css directory) by default., (*16)

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

License

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

The Versions

04/01 2016

dev-master

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

A LessCompiler Module for ZF2

  Sources   Download

GNU GENERAL PUBLIC LICENSE

The Requires

 

framework zf2 less compiler

04/01 2016

1.1.1

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

A LessCompiler Module for ZF2

  Sources   Download

GNU GENERAL PUBLIC LICENSE

The Requires

 

framework zf2 less compiler

24/07 2014

1.1.0

1.1.0.0 https://github.com/BradCrumb/BC_ZFLessCompiler

A LessCompiler Module for ZF2

  Sources   Download

GNU GENERAL PUBLIC LICENSE

The Requires

 

framework zf2 less compiler

04/04 2014

v1.0.1

1.0.1.0 https://github.com/BradCrumb/BC_ZFLessCompiler

A LessCompiler Module for ZF2

  Sources   Download

GNU GENERAL PUBLIC LICENSE

The Requires

 

framework zf2 less compiler

04/04 2014

1.0.0

1.0.0.0 https://github.com/BradCrumb/BC_ZFLessCompiler

A LessCompiler Module for ZF2

  Sources   Download

GNU GENERAL PUBLIC LICENSE

The Requires

 

framework zf2 less compiler