2017 © Pedro Peláez
 

library less-elephant

A library to manage a less project with PHP

image

cypresslab/less-elephant

A library to manage a less project with PHP

  • Friday, August 2, 2013
  • by matteosister
  • Repository
  • 1 Watchers
  • 3 Stars
  • 5,527 Installations
  • PHP
  • 3 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 9 Versions
  • 0 % Grown

The README.md

LessElephant Travis build status

A wrapper for the less binary written in PHP, (*1)

Requirements

  • php >= 5.3
  • *nix system with less (lessc binary) installed

Dependencies

for tests, (*2)

Installation

composer, (*3)

To install LessElephant with composer you simply need to create a composer.json in your project root and add:, (*4)

``` json { "require": { "cypresslab/less-elephant": "<=1.0.0" } }, (*5)


Then run ``` bash $ wget -nc http://getcomposer.org/composer.phar $ php composer.phar install

You have now LessElephant installed in vendor/cypresslab/lesselephant, (*6)

And an handy autoload file to include in you project in vendor/.composer/autoload.php, (*7)

pear, (*8)

Add the Cypresslab channel, (*9)

``` bash $ pear channel-discover pear.cypresslab.net, (*10)


And install the package. *By now LessElephant is in alpha state. So remember the -alpha in the library name* ``` bash $ pear install cypresslab/LessElephant-alpha

On Cypresslab pear channel homepage you can find other useful information, (*11)

Testing

The library is tested with PHPUnit., (*12)

Go to the base library folder and run the test suites, (*13)

``` bash $ phpunit, (*14)


Code style ---------- * LessElephant follows the [Symfony2 Coding Standard](https://github.com/opensky/Symfony2-coding-standard) * I'm using [gitflow](https://github.com/nvie/gitflow) so, if you want to contribute, please send a pull-request on develop branch How to use ---------- Remember to **give the user the right permissions to access the filesystem**. If you are using a web server give permissions to both your user and the web server user. **constructor** ``` php <?php $project = new LessProject("/path/to/less/folder", "screen.less", "/path/to/css/screen.css"); // create the base class // optionally you can pass a project name and a custom LessBinary class $project = new LessProject( "/path/to/less/folder", "main_file.less", "/path/to/css/file.css", "my-awesome-project", new LessBinary("/path/to/lessc") );

manage a less project, (*15)

php // return false if the project needs to be recompiled. In other words if you changed something in any of your less files after the last sylesheets generation if (!$project->isClean()) { $project->compile(); // compile the project } echo $project->isClean(); // returns true, (*16)

Staleness Checker, (*17)

LessElephant checks if the project need to be compiled with the awesome Symfony Finder component, by scanning your source less folder, (*18)

Symfony2

LessElephantBundle let symfony do the work for you, (*19)

The Versions

02/08 2013

dev-master

9999999-dev http://matteosister.github.com/LessElephant

A library to manage a less project with PHP

  Sources   Download

GPL3

The Requires

 

The Development Requires

css less

05/06 2013

dev-develop

dev-develop http://matteosister.github.com/LessElephant

A library to manage a less project with PHP

  Sources   Download

GPL3

The Requires

 

The Development Requires

css less

05/06 2013

0.2.5

0.2.5.0 http://matteosister.github.com/LessElephant

A library to manage a less project with PHP

  Sources   Download

GPL3

The Requires

 

The Development Requires

css less

05/06 2013

0.2.4

0.2.4.0 http://matteosister.github.com/LessElephant

A library to manage a less project with PHP

  Sources   Download

GPL3

The Requires

 

css less

09/09 2012

0.2.2

0.2.2.0 http://matteosister.github.com/LessElephant

A library to manage a less project with PHP

  Sources   Download

GPL3

The Requires

 

css less

09/02 2012

0.2.1

0.2.1.0 http://matteosister.github.com/LessElephant

A library to manage a less project with PHP

  Sources   Download

GPL3

The Requires

 

css less

09/02 2012

0.2.0

0.2.0.0 http://matteosister.github.com/LessElephant

A library to manage a less project with PHP

  Sources   Download

GPL3

The Requires

 

css less

08/02 2012

0.1.0

0.1.0.0 http://matteosister.github.com/LessElephant

A library to manage a less project with PHP

  Sources   Download

GPL3

The Requires

 

css less

08/02 2012

0.0.1

0.0.1.0 http://matteosister.github.com/LessElephant

A library to manage a less project with PHP

  Sources   Download

GPL3

The Requires

 

css less