My personal PostCSS based CSS pipeline
var postcss = require('postcss')
var pipeline = require('@emilbayes/css-pipeline')
postcss(pipeline()).process(cssString).then(oncomplete, onerror)
function oncomplete (result) {
console.log(result.css)
process.exit(0)
}
function onerror (err) {
console.error(err)
process.exit(1)
}Or with postcss-cli:
cat index.css | postcss --use @emilbayes/css-pipeline > bundle.cssReturns a PostCSS plugin.
opts.debug, also available through theDEBUGenv var. Defaults tofalseopts.rtl, also available through theRTLenv var. Defaults tofalse
npm install @emilbayes/css-pipeline