Download the PHP package notrix/compass-elephant without Composer
On this page you can find all versions of the php package notrix/compass-elephant. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download notrix/compass-elephant
More information about notrix/compass-elephant
Files in notrix/compass-elephant
Package compass-elephant
Short Description A library to manage a compass project with PHP
License LGPL-3.0+
Homepage http://matteosister.github.com/CompassElephant
Informations about the package compass-elephant
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 CompassElephant with composer you simply need to create a composer.json in your project root and add:
Then run
You have now CompassElephant 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
And install the package. By now CompassElephant is in alpha state. So remember the -alpha in the library name
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
Code style
- CompassElephant follows the Symfony2 Coding Standard
- I'm using 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
manage a compass project
Staleness Checker
Compass checks if the project need to be compiled in two different ways:
finder This method uses the awesome Symfony Finder component. It parse the config.rb file for the sass path and for the stylesheet path. Then check if the modification time of the stylesheets comes before the modification of the config file or a sass file. This is the default method.
native uses the command "compass compile --dry-run" and parse the output to see if there are stylesheets not aligned with sass. This method is not so cool because it's really slow. Even by using it only in a dev environment, it adds 400-500 ms of overhead on every check. So use it only if you can't use the finder method
Are you reinventing the wheel?
I use Assetic for my assets...and you should use it too.
But for now the Compass implementation do not work as intended. Assetic is built upon the concept of a single asset compiled. And it's not aware of dependencies
A pull request for assetic is not so easy, because it should change the entire structure of the library. And I know that the author is working on it.
I promise that, when the issue will be adressed, I will delete this library and return to Assetic. By now you can (should) use it to rewrite/uglify the stylesheets generated by CompassElephant. And this is exactly what I'm doing now.
Symfony2
CompassElephantBundle let symfony do the work for you