Skip to content

Commit

Permalink
Fix incorrect options objects and incorrect fn calls. Fixes #6.
Browse files Browse the repository at this point in the history
  • Loading branch information
nporteschaikin committed Oct 13, 2014
1 parent 0c157fb commit efab358
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions lib/adapter/map.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
var path = require('path');

module.exports = {

compilers: {
Expand All @@ -20,7 +22,8 @@ module.exports = {
'haml': {
kind: 'html',
render: function (source, options) {
var haml = require('hamljs')
var haml = require('hamljs');
options.filename = options.path;
return haml.render(source, options);
}
},
Expand All @@ -37,7 +40,7 @@ module.exports = {
render: function (source, options) {
var jade = require('jade');
options.pretty = true;

options.filename = options.path;
return jade.render(source, options);
}
},
Expand All @@ -54,6 +57,7 @@ module.exports = {
render: function (source, options) {
var less = require('less')
, output;
options.filename = options.path;
less.render(source, options, function (error, css) {
if (error) throw error;
output = css;
Expand All @@ -66,14 +70,16 @@ module.exports = {
kind: 'html',
render: function (source, options) {
var sneak = require('sneak');
return sneak.render(source, { basepath: dirname(options.path) });
options.basepath = path.dirname(options.path);
return sneak.render(source, options);
}
},

'stylus': {
kind: 'css',
render: function (source, options) {
var stylus = require('stylus');
options.filename = options.path;
return stylus.render(source, options);
}
}
Expand Down

0 comments on commit efab358

Please sign in to comment.