Node bindings to libsass
C++ JavaScript Other
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 1 commit ahead, 2336 commits behind sass:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
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