Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/youfoundron/gatsby-plugin-purify-css
Gatsby plugin for removing unused CSS in production.
https://github.com/youfoundron/gatsby-plugin-purify-css
gatsby gatsby-plugin plugin purifycss uncss
Last synced: about 1 month ago
JSON representation
Gatsby plugin for removing unused CSS in production.
- Host: GitHub
- URL: https://github.com/youfoundron/gatsby-plugin-purify-css
- Owner: youfoundron
- Created: 2017-09-19T04:15:15.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-01T23:38:39.000Z (about 6 years ago)
- Last Synced: 2024-11-21T02:18:13.658Z (about 2 months ago)
- Topics: gatsby, gatsby-plugin, plugin, purifycss, uncss
- Language: JavaScript
- Homepage:
- Size: 83 KB
- Stars: 27
- Watchers: 3
- Forks: 6
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Gatsby Plugin PurifyCSS
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
[![npm version](https://badge.fury.io/js/gatsby-plugin-purify-css.svg)](https://badge.fury.io/js/gatsby-plugin-purify-css) [![dependencies Status](https://david-dm.org/rongierlach/gatsby-plugin-purify-css/status.svg)](https://david-dm.org/rongierlach/gatsby-plugin-purify-css) [![devDependencies Status](https://david-dm.org/rongierlach/gatsby-plugin-purify-css/dev-status.svg)](https://david-dm.org/rongierlach/gatsby-plugin-purify-css?type=dev)
As featured in Gatsby's [community plugins](https://www.gatsbyjs.org/docs/plugins/#community-plugins).
A [Gatsby](https://github.com/gatsbyjs/gatsby) post-build plugin that implements [PurifyCSS](https://github.com/purifycss/purifycss).
Never worry about the size of your css framework again!
Updates your html files directly, removing any unused inline styles.## Gatsby 2
This plugin does not (currently) work with Gatsby 2. The
[purgecss](https://www.gatsbyjs.org/packages/gatsby-plugin-purgecss/) plugin
does and might be a suitable alternative.## Install
`$ npm install gatsby-plugin-purify-css`## Usage
In your `gatsby-config.js` file:
```javascript
module.exports = {
plugins: [
{
resolve: 'gatsby-plugin-purify-css',
options: {
/* Defaults */
styleId: 'gatsby-inlined-css',
purifyOptions: {
info: true,
minify: true
}
}
}
]
}
```## Options
PurifyCSS options are documented [here](https://github.com/purifycss/purifycss#the-optional-options-argument).