The broccoli-sass plugin compiles .scss
and .sass
files with
libsass.
npm install --save-dev broccoli-sass
var compileSass = require('broccoli-sass');
var outputTree = compileSass(inputTrees, inputFile, outputFile, options);
-
inputTrees
: An array of trees that act as the include paths for libsass. If you have a single tree, pass[tree]
. -
inputFile
: Relative path of the main.scss
or.sass
file to compile. Broccoli-sass expects to find this file in the first input tree (inputTrees[0]
). -
outputFile
: Relative path of the output CSS file. -
options
: A hash of options for libsass. Supported options areimagePath
,outputStyle
,precision
, andsourceComments
.
var appCss = compileSass(['styles', 'vendor'], 'myapp/app.scss', 'assets/app.css');