Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Node bindings to libsass
C++ JavaScript Other
Branch: master

This branch is 1 commit ahead, 1761 commits behind sass:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
examples
lib
libsass
.gitignore
README.md
binding.cpp
package.json
sass.js
test.js
wscript

README.md

node-sass

Node bindings to libsass

work in progress

Install

cd libsass && make && cd ..
node-waf configure && node-waf build

Usage

var sass = require('./sass');
sass.render('body{background:blue; a{color:black;}}', function(css){
  console.log(css)
});

Connect/Express middleware

Recompile .scss files automatically for connect and express based http servers

var server = connect.createServer(
  sass.middleware({
      src: __dirname
    , dest: __dirname + '/public'
    , debug: true
  }),
  connect.static(__dirname + '/public')
);

Heavily inspired by https://github.com/LearnBoost/stylus

TODO

  • async cpp
  • error handling
  • build libsass using node-waf
  • sass compression options
  • publish npm
  • use node-gyp for builds
  • file context
  • folder context
Something went wrong with that request. Please try again.