v3.0.0-pre
Pre-releaseThis is a pre release.
npm install node-sass@3.0.0-alpha.0 # (updated)
Breaking Changes:
-
Dropped method-style callback in favour of node-style option: (suggested by @sindresorhus; #676)
Implemented by: @jakoboOld:
require('node-sass').render({ /* options */, success: function (result) { }, error: function (err) { } });
New:
require('node-sass').render({ /* options */ }, function (err, result) { });
-
API returns
Buffer
output as opposed toString
. (suggested by @joliss #711)Old:
require('node-sass').render({ /* options */, success: function(result) { assert(typeof result.css === 'string'); assert(typeof result.map === 'string'); } });
New:
require('node-sass').render({ /* options */ }, function (err, result) { if (err) { return myErrorHandler(err); } assert(result.css instanceof Buffer); assert(result.map instanceof Buffer); });
-
Retired image path options. (driven by the change in libsass #702)
-
CLI now throws output to
stdout
, when no output file/directory is specified. (suggested by @xzyfer #669) -
The input, output and map paths are resolved against current-working-directory before passing to libsass. This fixes the issues with invalid paths in source-maps. (issue reported by @itsnydell: #731)
Enhancements
-
Now
this.options
is available inimporter
andrender
callbacks. Implemented by @jakobo via #686 . Also, see the related issue: #674. -
Made API throw Error object instead of Strings: (suggested by @sindresorhus; #675)
Old:
require('node-sass').render({ /* options */, error: function(err) { assert(typeof err === 'string'); });
New:
require('node-sass').render({ /* options */ }, function (err, result) { if (err) { assert(err instanceof Error); } });
-
Ignore test directory from package. (suggested by @dcbarans: #683)