PurgeCSSPurgeCSS
API Reference
GitHub
API Reference
GitHub
  • PurgeCSS

    • About PurgeCSS
    • Getting Started
    • Configuration
    • Command Line Interface
    • Programmatic API
    • Safelisting
    • Extractors
  • Plugins

    • PostCSS
    • Webpack
    • Gulp
    • Grunt
    • Gatsby
  • Guides

    • Vue
    • React
    • Next.js
    • Nuxt.js
    • Razzle
    • WordPress
    • Hugo
  • Comparison
  • Common Questions

    • How to use with CSS modules
    • How to use with Ant Design

Home > purgecss

purgecss package

Core package of PurgeCSS

Contains the core methods to analyze the files, remove unused CSS.

Classes

Class

Description

ExtractorResultSets

PurgeCSS

Class used to instantiate PurgeCSS and can then be used to purge CSS files.

VariableNode

VariablesStructure

Functions

Function

Description

mergeExtractorSelectors(extractors)

Merge two extractor selectors

setOptions(configFile)

Load the configuration file from the path

standardizeSafelist(userDefinedSafelist)

Format the user defined safelist into a standardized safelist object

Interfaces

Interface

Description

ExtractorResultDetailed

Extractors

Options

Options used by PurgeCSS to remove unused CSS Those options are used internally

RawContent

RawCSS

ResultPurge

UserDefinedOptions

Options used by PurgeCSS to remove unused CSS

Variables

Variable

Description

defaultOptions

Type Aliases

Type Alias

Description

ComplexSafelist

ExtractorFunction

ExtractorResult

PostCSSRoot

StringRegExpArray

UserDefinedSafelist

Edit this page