Skip to content
This repository has been archived by the owner on Dec 8, 2017. It is now read-only.

Latest commit

 

History

History
52 lines (43 loc) · 936 Bytes

README.md

File metadata and controls

52 lines (43 loc) · 936 Bytes

felt-sass

A Sass plugin for Felt.

Usage, in felt.config.js:

const sass = require('felt-sass');

module.exports = {
  handlers: {
    // your other handler(s) here
    '.scss': sass()
  }
};

You can post-process the resulting CSS with the post option, e.g. to pass them through postcss and cssnext:

const sass = require('felt-sass');
const postcss = require('felt-postcss');
const postcssImport = require('postcss-import');
const cssnext = require('postcss-cssnext');
const sass = require('felt-sass');

const post = postcss({
  plugins: [
    postcssImport(),
    cssnext()
  ],
  options: {
    map: { inline: false }
  }
});

module.exports = {
  handlers: {
    // your other handler(s) here
    '.scss': sass({
      post: post
    }),
    '.css': post
  }
};