dart-sass/package
2018-03-16 14:38:46 -07:00
..
chocolatey Add support for building a Chocolatey package. (#98) 2017-01-13 16:13:26 -08:00
dart-sass.bat Name the standalone executable sass rather than dart-sass (#257) 2018-03-16 14:38:46 -07:00
dart-sass.sh Name the standalone executable sass rather than dart-sass (#257) 2018-03-16 14:38:46 -07:00
package.json Add a specialized README for npm 2018-02-02 16:37:06 -08:00
README.npm.md Show Travis status for the master branch only 2018-02-04 16:18:10 -08:00
sass.bat Name the standalone executable sass rather than dart-sass (#257) 2018-03-16 14:38:46 -07:00
sass.js Build an NPM module. 2016-10-14 17:39:28 -07:00
sass.sh Name the standalone executable sass rather than dart-sass (#257) 2018-03-16 14:38:46 -07:00

A pure JavaScript implementation of Sass. Sass makes CSS fun again.

Sass logo npm statistics Travis build status
Appveyor build status

This package is a distribution of Dart Sass, compiled to pure JavaScript with no native code or external dependencies. It provides a command-line sass executable and a Node.js API.

Usage

You can install Sass globally using npm install -g sass which will provide access to the sass executable. You can also add it to your project using npm install --save-dev sass. This provides the executable as well as a library:

var sass = require('sass');

sass.render({file: scss_filename}, function(err, result) { /* ... */ });

// OR

var result = sass.renderSync({file: scss_filename});

See below for details on Dart Sass's JavaScript API.

API

See Also

  • Dart Sass, from which this package is compiled, can be used either as a stand-alone executable or as a Dart library. Running Dart Sass on the Dart VM is substantially faster than running the pure JavaScript version, so this may be appropriate for performance-sensitive applications. The Dart API is also (currently) more user-friendly than the JavaScript API. See the Dart Sass README for details on how to use it.

  • Node Sass, which is a wrapper around LibSass, the C++ implementation of Sass. Node Sass supports the same API as this package and is also faster (although it's usually a little slower than Dart Sass). However, it requires a native library which may be difficult to install, and it's generally slower to add features and fix bugs.

Behavioral Differences from Ruby Sass