Welcome to cssDir2
cssDir2 is a simple ruby script for compass to copy the generated css file to a different location.
How to install?
- Install Compass
$ gem update --system
$ gem install compass
- Install cssDir2
$ gem install cssDir2
- Require it in your config.rb
require 'cssDir2'
- That's it!
How to use it?
Open up your config.rb and create a variable where you specify the path to the location where you want cssDir2 to copy the generated css file to based on the location of your sass file.
css_dir2 = "../path/to/directory"
When the specified directory doesn't exist, cssDir2 will create it.
Now call cssDir2 and start watching your project with Compass!
CssDir2.new(css_dir, css_dir2)
You could also skip the creation of a variable and pass in the path directly into the 2nd argument.
CssDir2.new(css_dir, "../path/to/directory")
An example config.rb file would look like the following:
http_path = "/"
css_dir = "stylesheets"
sass_dir = "sass"
images_dir = "images"
javascripts_dir = "javascripts"
require 'cssDir2'
css_dir2 = "../css"
CssDir2.new(css_dir, css_dir2)