0.2.0 • Published 6 years ago

stakit-postcss v0.2.0

Weekly downloads
-
License
ISC
Repository
-
Last release
6 years ago

stakit-postcss

Stakit + PostCSS

Installation

npm i stakit-postcss

Example

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 plugins
  • opts.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.

0.2.0

6 years ago

0.1.0

6 years ago