Skip to content

Commit

Permalink
temp workaround for sass/node-sass#425
Browse files Browse the repository at this point in the history
only `sourceMap: true` works
  • Loading branch information
sindresorhus committed Oct 16, 2014
1 parent 886a4d3 commit 966f22e
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions tasks/sass.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ var sass = require('node-sass');

module.exports = function (grunt) {
grunt.registerMultiTask('sass', 'Compile Sass to CSS', function () {
var options = this.options({
precision: 10
});

eachAsync(this.files, function (el, i, next) {
var options = this.options({
precision: 10
});

var src = el.src[0];

if (path.basename(src)[0] === '_') {
Expand All @@ -23,8 +23,9 @@ module.exports = function (grunt) {
}

sass.renderFile(assign({}, options, {
file: src,
outFile: el.dest,
// temp workaround for sass/node-sass#425
file: path.resolve(src),
outFile: path.resolve(el.dest),
success: function (css, map) {
grunt.log.writeln('File ' + chalk.cyan(el.dest) + ' created.');

Expand All @@ -40,6 +41,6 @@ module.exports = function (grunt) {
next(error);
}
}));
}, this.async());
}.bind(this), this.async());
});
};

0 comments on commit 966f22e

Please sign in to comment.