🌳 Postcss compiler as a Broccoli filter.
JavaScript CSS
Latest commit 1ad97d9 Jan 19, 2017 @jeffjewiss 3.2.1

README.md

broccoli-postcss

Travis Build Status npm version Coverage Status bitHound Overall Score

The broccoli-postcss plugin runs your css through postcss plugins of your choosing.

Installation

npm install --save-dev broccoli-postcss

Usage

var compileCSS = require('broccoli-postcss')
var outputTree = compileCSS(tree, options)

API

broccoliPostcss(tree, [options])

options

plugins

Type: array

A list of plugin objects to be used by Postcss (a minimum of 1 plugin is required). The supported object format is module: the plugin module itself, and options: an object of supported options for the given plugin.

map

Type: object Default: { inline: false, annotation: false }

An object of options to describe how Postcss should handle source maps.

Example

/* Brocfile.js */
var compileCSS = require('broccoli-postcss')
var cssnext = require('postcss-cssnext')

var options =  {
  plugins: [
    {
      module: cssnext,
      options: {
          browsers: ['last 2 version']
      }
    },
  ]
}

var outputTree = compileCSS('app/styles', options)
module.exports = outputTree