Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

v3.0.0-pre

Pre-release
Pre-release
Compare
Choose a tag to compare
@am11 am11 released this 11 Mar 06:25
· 921 commits to master since this release

This 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: @jakobo

    Old:
      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 to String. (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 in importer and render 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)

Infrastructure:

  • Better support for io.js rapid release cycle. (suggested by @xzyfer #694).
  • Binaries downloadable from custom URL.(suggested by @johnrc #720).
  • Binaries are now uploaded as release assets, which used to be hosted via node-sass-binaries repo release.(suggested by @nschonni #712).