A plugin to transpile Sass files for the component builder.
JavaScript CSS
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
example
.gitignore
History.md
Makefile
README.md
index.js
package.json

README.md

component-sass

A plugin to transpile Sass files for the component builder.

Install

$ npm install segmentio/component-sass#0.0.3

Usage

Add your .sass or .scss files to the styles array in your component.json:

{
  "styles": [
    "base.sass",
    "button.scss"
  ]
}

Use the plugin during your build process:

var fs      = require('fs')
  , Builder = require('component-builder')
  , sass    = require('component-sass');

var builder = new Builder(__dirname);

builder.use(sass);

builder.build(function(err, res){
  if (err) throw err;
  fs.writeFileSync('build/build.js', res.require + res.js);
  if (res.css) fs.writeFileSync('build/build.css', res.css);
});