Compass wrapper and middleware for node.js.
JavaScript
Latest commit b3d63c9 Apr 28, 2017 @greenkeeper greenkeeper[bot] committed with 🌴 update mocha to version 3.3.0 (#12)
Permalink
Failed to load latest commit information.
lib initial commit. Feb 4, 2013
test initial commit. Feb 4, 2013
.gitignore fixed #8, added .gitignore. Mar 14, 2015
README.md fixed #6, docs typo Jul 23, 2013
index.js initial commit. Feb 4, 2013
package.json 🌴 update mocha to version 3.3.0 (#12) Apr 28, 2017

README.md

compass

Compass wrapper and middleware for node.js.

Install

Ensure compass is already installed (install compass).

Then just use npm:

npm install compass

Usage

Middelware

Ensure compass comes before a static middleware. compass generates your css files but does not serve them. You need a static middleware for that.

var compass = require('compass'),
    express = require('express')();

app = express();
app.use(compass({ cwd: __dirname + 'public' }));
app.use(express.static(__dirname + 'public'));

Manually

For now compass only wraps the compile action.

var compass = require('compass');

// compiles in process.cwd()
compass.compile(function(err, stdout, stderr) {
    console.log('done');
});

// compiles in the given directory
compass.compile({ cwd: __dirname + 'public' }, function(err, stdout, stderr) {
    console.log('done');
});

Options

For now compass only offer the cwd option.

If you want to customize stuff, please use a config.rb ([http://compass-style.org/help/tutorials/configuration-reference](configuration reference))