Skip to content
Browse files

Added support for SASS using node-sass

  • Loading branch information...
1 parent 7b00063 commit f5e272a299a0f182af55ef936588220b0e503ae3 @pferreir committed Apr 16, 2013
Showing with 8 additions and 0 deletions.
  1. +5 −0 lib/compiler.coffee
  2. +3 −0 lib/default_compilers.coffee
View
5 lib/compiler.coffee
@@ -21,6 +21,11 @@ exports.compile = compile = (compilers, content, file, cb) ->
return cb(null, compilers.css(content))
when 'js'
return cb(null, compilers.js(content))
+ when 'scss'
+ return compilers.sass content, (err, result) ->
+ if err?
+ console.log err.message
+ return cb(null, result)
exports.compileFile = (compilers, file, cb) ->
content = fs.readFileSync(file, 'utf-8')
View
3 lib/default_compilers.coffee
@@ -11,3 +11,6 @@ module.exports =
return content
css: (content) ->
return content
+ sass: (content, callback) ->
+ sass = require 'node-sass'
+ return sass.render(content, callback)

0 comments on commit f5e272a

Please sign in to comment.
Something went wrong with that request. Please try again.