A Grunt plugin for compiling multiple Compass projects (ie. it compiles against many config.rb targets). This is useful for highly modular project structures such as those of Drupal and Wordpress.
IMPORTANT: This plugin requires at least Grunt 0.4 or higher and Compass 1.X.X or higher - it is recommended that you always run the latest versions of both.
Ensure you have Compass installed and in your PATH by checking for its version. If you get an error, install it.
$ compass --version # you should see version 1.X.X or higher$ gem install compass # if you get an error
Now install the Grunt task:
$ npm install grunt-compass-compiler
Then add this line to your project's
This allows you to use the 'compass' task to specify targets!
The task will look for a 'prod.rb' (instead of config.rb) file in each target directory found. It will execute 'compass compile' along with any given option on each target.
$ grunt compass:modules --env=prod
Would compile each prod.rb found anywhere inside "sites/all/modules" by executing this command:
compass task is a multi task, meaning that it will implicitly iterate over all of its targets if no target is specified.
Windows support is predictably absent
You must have Compass in your system PATH or this task won't work
Feel free to fork if you see possible improvements or contact me directly if you want to contribute to this project (or just submit a pull request): firstname.lastname@example.org
This project is licensed under the MIT license.