Wondering what’s next for npm?Check out our public roadmap! »

    purgecss
    TypeScript icon, indicating that this package has built-in type declarations

    4.0.3 • Public • Published

    PurgeCSS

    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.

    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.

    Install

    npm i purgecss

    DownloadsWeekly Downloads

    1,314,635

    Version

    4.0.3

    License

    MIT

    Unpacked Size

    46.6 kB

    Total Files

    8

    Homepage

    purgecss.com

    Last publish

    Collaborators

    • avatar
    • avatar