# Adding Compass to gulpfile.js

**URL:** https://discourse.roots.io/t/adding-compass-to-gulpfile-js/3210
**Category:** sage
**Tags:** gulp
**Created:** 2015-03-13T00:28:46Z
**Posts:** 11
**Showing post:** 3 of 11

## Post 3 by @drew — 2015-03-13T09:07:55Z

Hi @deschet,

Austins solution will work but you don’t have to sacrifice the speed of node just to use compass, in fact you don’t need ruby atall.

First off you just need to install the NPM [compass-mixins](https://www.npmjs.com/package/compass-mixins) package.

```
npm install compass-mixins --save-dev
```

Then you will need to add a extra line to your gulpfile.js

```
var cssTasks = function(filename) {
  return lazypipe()
    .pipe(function() {
      return $.if(!enabled.failStyleTask, $.plumber());
    })
    .pipe(function() {
      return $.if(enabled.maps, $.sourcemaps.init());
    })
      .pipe(function() {
        return $.if('*.less', $.less());
      })
      .pipe(function() {
        return $.if('*.scss', $.sass({
          outputStyle: 'nested', // libsass doesn't support expanded yet
          includePaths: [
		   './node_modules/compass-mixins/lib' // Add this bit just here =D
		  ],
          precision: 10,
          errLogToConsole: !enabled.failStyleTask
        }));
      })
      .pipe($.concat, filename)
      .pipe($.pleeease, {
          browsers: [
            'last 2 versions', 'ie 8', 'ie 9', 'android 2.3', 'android 4',
            'opera 12'
          ],
          minifier: argv.production,
      })
    .pipe(function() {
      return $.if(enabled.rev, $.rev());
    })
    .pipe(function() {
      return $.if(enabled.maps, $.sourcemaps.write('.'));
    })();
};
```

And there you go, you can now use Compass mixins in your sass files just as you did previously but without Ruby or the slooowwww that comes with it.

Just add **@import “compass”;** to the top of your sass file and your all set.

I use the exact same process to add [suzy](http://susydocs.oddbird.net/en/latest/) to the mix for snazzy grid logic.

---

_[View the full topic](https://discourse.roots.io/t/adding-compass-to-gulpfile-js/3210)._
