Sean McMillan
Sean McMillan

Reputation: 10093

Using Compass style library without their command line tool

I'm working on a web application. We already have a build process that compiles our .scss files into a final .css stylesheet. We'd like to adopt compass, and use their semantic blueprint mixins.

However, compass seems to want to "own" the project structure. I already have a build tool (brunch), and just want to use compass' mixins, not their whole workflow.

Is there a way to access Compass' mixins from vanilla SASS?

or, alternatively,

Is there a way to limit Compass' command line tool to only do the .scss files, and leave my images and javascript alone?

Upvotes: 0

Views: 401

Answers (1)

fmquaglia
fmquaglia

Reputation: 407

I'm not sure if this is exactly what you need but here's what I do:

I have a custom compass_config.rb where I set the paths exactly how I want them:

http_path       = '/'
sass_dir        = 'your/sass/path'
css_dir         = 'your/css/path'
images_dir      = 'your/image/path'
javascripts_dir = 'your/javascript/path'

Then I use the compass command line tool with the following parameters: compass compile --sass-dir other/sass/path/stylesheets --css-dir other/css/path/stylesheets -c path/to/compass_config.rb

It may seem silly but the important thing here is that you can:

  1. Configure the default paths as you need them in your compass_config.rb (of course you can name this file as you wish)
  2. Tell exactly to compass what it needs to perform when executed through command options
  3. You can use watch instead od compile to continuously poll for changes and compile when they happen

Please have a look at compass -h, compass help compile or here.

I hope it helps.

Upvotes: 1

Related Questions