0.2.0 • Published 6 years ago
stakit-postcss v0.2.0
stakit-postcss
Stakit + PostCSS
Installation
npm i stakit-postcssExample
var stakit = require('stakit')
var path = require('path')
var postcss = require('stakit-postcss')
stakit()
.use(postcss(path.join(__dirname, './style.css')))
.routes(() => ['/'])
.render(render)
.output()API
postcss(entry, opts, postcssOpts)
Returns a Stakit plugin that runs entry through PostCSS and includes it in the files outputted by Stakit.
opts are stakit-postcss specific options (with defaults):
opts.plugins: []- an array of PostCSS pluginsopts.includeStyle: true- whether a<link>tag should automatically be included in the<head>opts.output: '/bundles/bundle.css'- output location within the Stakit's output directory
postcssOpts are simply forwarded to PostCSS. The from value is always set to entry.