diff --git a/lib/index.js b/lib/index.js index 3f20708f1..421dcd7b1 100644 --- a/lib/index.js +++ b/lib/index.js @@ -5,6 +5,7 @@ var path = require('path'), clonedeep = require('lodash/cloneDeep'), assign = require('lodash/assign'), + fromCallback = require('universalify').fromCallback, sass = require('./extensions'); /** @@ -283,7 +284,7 @@ function normalizeFunctionSignature(signature, callback) { * @api public */ -module.exports.render = function(opts, cb) { +module.exports.render = fromCallback(function(opts, cb) { var options = getOptions(opts, cb); // options.error and options.success are for libsass binding @@ -376,7 +377,7 @@ module.exports.render = function(opts, cb) { } else { cb({status: 3, message: 'No input specified: provide a file name or a source string to process' }); } -}; +}); /** * Render sync diff --git a/package.json b/package.json index d21e6a21c..7f776795d 100644 --- a/package.json +++ b/package.json @@ -69,7 +69,8 @@ "request": "^2.88.0", "sass-graph": "^2.2.4", "stdout-stream": "^1.4.0", - "true-case-path": "^1.0.2" + "true-case-path": "^1.0.2", + "universalify": "^0.1.2" }, "devDependencies": { "coveralls": "^3.0.2",