Guard::Compass

Gem Version Build Status Dependency Status Code Climate Coverage Status

Guard::Compass allows to automatically run Compass whenever a stylesheet file is modified.

  • Compatible with Compass >= 0.10.5.
  • Tested against Ruby 1.9.3, 2.0.0, Rubinius & JRuby (1.9 mode only).

Install

Please be sure to have Guard installed before continue.

The simplest way to install Guard::Compass is to use Bundler.

Add Guard::Compass to your Gemfile:

group :development do
  gem 'guard-compass'
end

and install it by running Bundler:

$ bundle

Add guard definition to your Guardfile by running the following command:

$ guard init compass

Usage

Please read Guard usage doc

guard :compass, configuration_file: 'config/compass_config.rb', project_path: 'public',
      compile_on_start: true do
  watch(%r{..\/foo\/bar\/sass\/.*\.sass$})
end

Configure Guard::Compass plug-in

The default configuration generated by 'guard init compass' looks like this

guard :compass

Options

List of available options

project_path: 'public'                          # path to the compass project directory (from guard working directory)
configuration_file: 'config/compass_config.rb'  # path to your compass configuration file (from guard working directory)
compile_on_start: true                          # compile stylesheets when guard starts

By default, the project path is equal to the guard working directory (the folder from where you start Guard). Compass will look into some default location for the config file from there.

The configuration_file is computed by compass. You don't need to define watchers like in other Guard plug-in because they are generated from the Compass configuration files, cool!

For the complete list of options, please refer to the Compass documentation.

Development

Pull requests are very welcome! Please try to follow these simple rules if applicable:

  • Please create a topic branch for every separate change you make.
  • Make sure your patches are well tested. All specs run by Travis CI must pass.
  • Update the README.
  • Please do not change the version number.

For questions please join us in our Google group or on #guard (irc.freenode.net).

Maintainer

Rémy Coutable

Author

Olivier Amblet

Contributors

https://github.com/guard/guard-compass/graphs/contributors