Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/morrislaptop/poi-preset-purifycss
egoist/poi#253
https://github.com/morrislaptop/poi-preset-purifycss
Last synced: about 1 month ago
JSON representation
egoist/poi#253
- Host: GitHub
- URL: https://github.com/morrislaptop/poi-preset-purifycss
- Owner: morrislaptop
- License: mit
- Created: 2018-02-05T10:36:23.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-02-07T16:37:16.000Z (almost 7 years ago)
- Last Synced: 2024-10-14T01:32:04.394Z (2 months ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/poi-preset-purifycss
- Size: 8.79 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-poi - poi-preset-purifycss - Tree shake your CSS just like your JS. (Presets)
README
# poi-preset-purifycss
Use purify-css to remove unused CSS. See egoist/poi#253
## Install
```bash
yarn add poi-preset-purifycss --dev
```## Usage
This preset will add PurifyCSSPlugin with [purifycss-webpack](https://github.com/webpack-contrib/purifycss-webpack) for you:
By default it will scan all *.vue files for markup to determine what CSS classes you are using.
```js
// poi.config.js
module.exports = {
presets: [
require('poi-preset-purifycss')()
]
}
```Then it will reduce CSS code when you run `poi build`.
It accepts the same options as which in [purifycss-webpack](https://github.com/webpack-contrib/purifycss-webpack#options):
```js
require('poi-preset-purifycss')({ minimize: true, paths: '**/*.html' })
```## License
MIT © [morrislaptop](https://github.com/morrislaptop)