Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

broccoli-sass

joliss1.7kMIT0.7.0

Libsass-based Sass compiler for Broccoli

broccoli-plugin, sass, scss, css, libsass

readme

broccoli-sass

Build Status

The broccoli-sass plugin compiles .scss and .sass files with libsass.

Installation

npm install --save-dev broccoli-sass

Usage

var BroccoliSass = require('broccoli-sass');

var outputNode = new BroccoliSass(inputNodes, inputFile, outputFile, options);
  • inputNodes: An array of nodes that act as the include paths for libsass. If you have a single node, pass [node].

  • inputFile: Relative path of the main .scss or .sass file to compile. Broccoli-sass expects to find this file in the first input node (inputNodes[0]).

  • outputFile: Relative path of the output CSS file.

  • options: A hash of options for libsass. Supported options are imagePath, outputStyle, precision, and sourceComments.

  • annotation: A human-readable description, to tell multiple instances of this plugin apart.

Example

var appCss = new BroccoliSass(['styles', 'vendor'], 'myapp/app.scss', 'assets/app.css');

This will compile styles/myapp/app.scss with vendor as an additional load path. The appCss node will contain a single assets directory with a large compiled app.css file in it.

changelog

master

0.7.0

  • Upgrade to node-sass ^3.4.1

0.6.8

  • Add annotation option
  • Update CachingWriter dependency

0.6.7

  • Upgrade to node-sass ^3.3.3

0.6.6

  • Upgrade to node-sass ^3.0.0

0.6.5

  • Upgrade to node-sass 3.0.0-beta.7

0.6.4

  • Upgrade to node-sass 3.0.0-beta.5

0.6.3

  • Upgrade to node-sass 3.0.0-beta.4

0.6.2

  • Upgrade to node-sass 3.0.0-alpha.1

0.6.1

  • Update node-sass dependency

0.6.0

  • Upgrade to node-sass 3.0.0-pre

0.5.0

  • Look for main .scss file only in the first input tree (load path)

0.4.0

  • Upgrade to node-sass 2.0.1
  • Remove defective source map support; we may bring it back later

0.3.3

  • Upgrade to node-sass ^1.1.4

0.3.2

  • Fix broken release

0.3.1

  • Upgrade to node-sass ^1.0.3

0.3.0

  • Upgrade to node-sass ^1.0.1

0.2.4

  • Fix path handling issue

0.2.3

  • Cache Sass output using broccoli-caching-writer

0.2.2

  • Add support for precision option

0.2.1

  • Guard against passing a tree instead of array

0.2.0

  • Upgrade to node-sass ^0.9.2

0.1.4

  • Upgrade to node-sass 0.8.5 and make source maps work

0.1.3

  • Use new broccoli-writer base class

0.1.2

  • Update package description

0.1.1

  • Add missing cleanup method

0.1.0

  • Initial working implementation

0.0.1

  • Initial placeholder release