npm install --save-dev broccoli-postcss
const compileCSS = require ( 'broccoli-postcss' )
const outputTree = compileCSS ( tree , options )
-
V6 broccoli-postcss -> Postcss V8 -
V5 broccoli-postcss -> Postcss V7
-
Object form plugins: [ { module : require ( 'some-plugin' ) , options : { /* options for `some-plugin` */ } } ] -
Function form plugins: [ require ( 'some-plugin' ) ( { /* options for `some-plugin` */ } ) ]
/* Brocfile.js */
var compileCSS = require ( 'broccoli-postcss' )
var cssnext = require ( 'postcss-cssnext' )
var options = {
plugins : [
{
module : cssnext ,
options : {
browsers : [ 'last 2 version' ]
}
} ,
] ,
map : false ,
include : [ 'styles/*.css' ] ,
exclude : [ 'vendor/bootstrap/**/*' ]
}
var outputTree = compileCSS ( 'app/styles' , options )
module . exports = outputTree