Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Guard::Sass automatically rebuilds sass files when modified (like sass --watch)

tag: v0.2.0

Fetching latest commit…

Cannot retrieve the latest commit at this time

Readme.md

Guard-Sass

guard-sass compiles your sass (and scss) files automatically when changed.

Install

You will need to have guard to continue, so install it now!.

Install the gem with:

gem install guard-sass

Add it to your Gemfile:

gem 'guard-sass'

And finally add a basic setup to your Guardfile with:

guard init sass

Usage

guard 'sass' do
  watch(%r{^sass/.+\.s[ac]ss})
end

Defaults to writing to 'css/' but this can be changed....

guard 'sass', :output => 'styles' do
  watch(%r{^sass/.+\.s[ac]ss})
end

guard-sass also has a short notation like guard-coffeescript, this let's you define an input folder (with an optional output folder) and the watcher is defined for you.

guard 'sass', :input => 'sass', :output => 'css'
# or
guard 'sass', :input => 'stylesheets'

Options

:input => 'sass'                    # Relative path to the input directory
:output => 'css'                    # Relative path to the output directory
:notification => false              # Whether to display notifications after finished,
                                    #  default: true
:load_paths => ['sass/partials']    # Paths for sass to find imported sass files from,
                                    #  default: all directories under current

Contributors

Something went wrong with that request. Please try again.