Remove unused css selectors
Last updated 2 months ago by afzalsayed96 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @afzalsayed96/purgecss 
SYNC missed versions from official npm registry.


David David Dependabot npm npm GitHub

PurgeCSS logo

What is PurgeCSS?

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 files with the one in your content files. It removes unused selectors from your css, resulting in smaller css files.

Version 1

If you are looking for PurgeCSS 1, the documentation is here


You can find the PurgeCSS documentation on this website.

Table of Contents




Getting Started


npm i --save-dev purgecss


import PurgeCSS from 'purgecss'
const purgeCSSResults = await new Purgecss().purge({
  content: ['**/*.html'],
  css: ['**/*.css']


Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.


PurgeCSS use SemVer for versioning.


This project is licensed under the MIT License - see the LICENSE file for details.

Current Tags

  • 2.1.0                                ...           latest (2 months ago)

1 Versions

  • 2.1.0                                ...           2 months ago
Maintainers (1)
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 0
Last Month 8
Dependencies (4)
Dev Dependencies (1)

Copyright 2014 - 2016 © taobao.org |