Zero configuration PostCSS plugin for Docz
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
.npmrc
.prettierrc
CONTRIBUTING.md
LICENSE
README.md
package-lock.json
package.json
tsconfig.json
tslint.json

README.md

Docz Plugin PostCSS

docz logo postcss logo

Zero configuration PostCSS plugin for Docz


version downloads MIT License

PRs Welcome

Watch on GitHub Star on GitHub Tweet

Install

Install docz-plugin-postcss using npm:

npm i -D docz-plugin-postcss

Or using Yarn with:

yarn add --dev docz-plugin-postcss

Usage

Just import the plugin inside your doczrc.js

import { postCSSPlugin } from 'docz-plugin-postcss';

export default {
  plugins: [postCSSPlugin()],
};

Custom configuration

This project uses PostCSS Preset Env so you don't need to manually install all the different PostCSS plugins but just pass-in your desired configuration. Have a look at the preset-env playground for testing out all of the available features.

You can pass a custom configuration according to the PostCSS Preset Env documentation.

Eg.

import { postCSSPlugin } from 'docz-plugin-postcss';

export default {
  plugins: [
    postCSSPlugin({
      stage: 3,
      features: {
        'nesting-rules': true,
      },
    }),
  ],
};

License

MIT License © Andrea SonnY