Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compass config.rb Location

I want to add Compass to my existing project. I want to maintain my current project structure, which looks like this (simplified):

app/
build/    
 |-compass/
assets/
 |-css/
   |-scss
 |-js/
 |-img/

So I want all my SASS files under \assets\css\scss and I want to output the compiled CSS files to \assets\css.

Running:

compass create --bare --sass-dir "assets\css\scss" --css-dir "assets\css"

creates the Compass config.rb file directly under my root.

However, I want the file to be under \build\compass.

  1. How can I control where Compass creates the config.rb file?
  2. Compass documentation says that declarations in config.rb (e.g. css_dir, sass_dir, etc.) are all relative to the project_path. Where do I define the project_path?
like image 977
elanh Avatar asked Sep 29 '13 13:09

elanh


People also ask

What is config RB?

The config.rb file is the brain of a Compass project. It defines the relationship between files and their assets, how and where the CSS should be generated, and any dependencies for a project.

What is Compass SCSS?

Compass is a stylesheet authoring framework that makes your stylesheets and markup easier to build and maintain. With compass, you write your stylesheets in Sass instead of plain CSS.


1 Answers

Compass creates the config.rb in the same directory as where you ran the command from. The project path is where the config.rb resides. You're free to place config.rb wherever you like, as long as you adjust the paths for your assets.

like image 194
cimmanon Avatar answered Oct 09 '22 19:10

cimmanon