Skip to content

matteosister/CompassElephant

Repository files navigation

CompassElephant

A wrapper for the compass binary written in PHP

Requirements

  • php >= 5.3
  • *nix system with compass installed

Dependencies

for tests

Installation

composer

To install GitElephant with composer you simply need to create a composer.json in your project root and add:

{
    "require": {
        "cypresslab/gitelephant": ">=0.1.0"
    }
}

Then run

$ wget -nc http://getcomposer.org/composer.phar
$ php composer.phar install

You have now GitElephant installed in vendor/cypresslab/compasselephant

And an handy autoload file to include in you project in vendor/.composer/autoload.php

pear

Add the Cypresslab channel

$ pear channel-discover pear.cypresslab.net

And install the package. By now CompassElephant is in alpha state. So remember the -alpha in the library name

$ pear install cypresslab/CompassElephant-alpha

On Cypresslab pear channel homepage you can find other useful information

Testing

The library is fully tested with PHPUnit.

Go to the base library folder and run the test suites

$ phpunit

Code style

How to use

<?php

use CompassElephant\CompassProject,
    CompassElephant\CompassBinary;

$binary = new CompassBinary('/usr/local/bin/compass'); // this object represent your compass binary file on the filesystem
// you can omit the binary location. The library will try to find the binary with "which compass"
$binary = new CompassBinary();

$caller = new CommandCaller();

$project = new CompassProject();

Symfony2

There is a CompassElephantBundle to use this library inside a Symfony2 project.

About

An abstraction layer for compass written in PHP

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages