Socket
Socket
Sign inDemoInstall

purgecss

Package Overview
Dependencies
4
Maintainers
2
Versions
62
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    purgecss

Remove unused css selectors


Version published
Weekly downloads
773K
increased by1.94%
Maintainers
2
Install size
910 kB
Created
Weekly downloads
 

Changelog

Source

5.0.0 (2022-09-13)

Bug Fixes

  • add safelist variables to postcss-purgecss #840 (c822058)
  • gulp-purgecss: support skippedContentGlobs option #853 (b72de77)
  • Purgecss webpack plugin/only filter fix (#933) (f8e4c2c)
  • purgecss-webpack-plugin: add sourcemap support #409 (b3f73ed)
  • purgecss-webpack-plugin: export as named export as well as default (#821) (a6a2c8e)
  • wrong path import (4f3ddd0)

Features

  • add source map support #526 (f2a9c5a)
  • gulp-purgecss: add support for gulp-sourcemaps #257 (55c26d2)
  • postcss-purgecss: load options from purgecss config (4de3bd8)
  • purgecss-webpack-plugin: load config file automatically #767 (726faaa)

BREAKING CHANGES

  • purgecss-webpack-plugin: drop webpack 4 support

Readme

Source

PurgeCSS

npm npm GitHub Dependabot Coverage Status

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.

Sponsors 🥰

Documentation

You can find the PurgeCSS documentation on this website.

Table of Contents

PurgeCSS
Plugins
Guides

Getting Started

Installation
npm i --save-dev purgecss

Usage

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

Contributing

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

Versioning

PurgeCSS use SemVer for versioning.

License

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

Keywords

FAQs

Last updated on 13 Sep 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc