Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork244
FullHuman/purgecss
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
When you are building a website, chances are that you are using a css framework like Bootstrap, Materializecss, Foundation, etc... But you will only use a small set of the framework and a lot of unused css styles will be included.
This is where PurgeCSS comes into play. PurgeCSS analyzes your content and your css files. Then it matches the selectors used in your css files with the ones in your content files. It removes unused selectors from your css, resulting in smaller css files.
You can find the PurgeCSS documentation onthis website.
npm install purgecss --save-dev
import{PurgeCSS}from"purgecss";constpurgeCSSResults=awaitnewPurgeCSS().purge({content:["**/*.html"],css:["**/*.css"],});
This repository is a monorepo that we manage usingLerna. That means that we actually publishseveral packages to npm from the same codebase, including:
| Package | Version | Description |
|---|---|---|
| purgecss | The core of PurgeCSS | |
| postcss-purgecss | PostCSS plugin for PurgeCSS | |
| purgecss-webpack-plugin | Webpack plugin for PurgeCSS | |
| gulp-purgecss | Gulp plugin for PurgeCSS | |
| grunt-purgecss | Grunt plugin for PurgeCSS | |
| rollup-plugin-purgecss | Rollup plugin for PurgeCSS | |
| purgecss-from-html | Html extractor for PurgeCSS | |
| purgecss-from-pug | Pug extractor for PurgeCSS | |
| purgecss-with-wordpress | Collection of safelist items for WordPress | |
| vue-cli-plugin-purgecss | Vue CLI Plugin for PurgeCSS |
About
Remove unused CSS
Topics
Resources
License
Code of conduct
Contributing
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
Uh oh!
There was an error while loading.Please reload this page.
