purgecss

Remove unused css

Github星跟踪图

PurgeCSS

David (path)
David (path)
Dependabot
npm
npm
GitHub

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

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']
})

Packages

This repository is a monorepo that we manage using Lerna. That means that we actually publish several packages to npm from the same codebase, including:, Package, Version, Description, ------------------------------------------------------------, -------------------------------------------------------------------------------------------, -------------------------------------------, purgecss, npm, The core of PurgeCSS, postcss-purgecss, npm (scoped), PostCSS plugin for PurgeCSS, purgecss-webpack-plugin, npm, Webpack plugin for PurgeCSS, gulp-purgecss, npm, Gulp plugin for PurgeCSS, grunt-purgecss, npm, Grunt plugin for PurgeCSS, purgecss-from-html, npm, Html extractor for PurgeCSS, purgecss-from-js, npm, Js extractor for PurgeCSS, purgecss-from-pug, npm, Pug extractor for PurgeCSS, purgecss-with-wordpress, npm, Collection of whitelist items for WordPress

主要指标

概览
名称与所有者FullHuman/purgecss
主编程语言TypeScript
编程语言JavaScript (语言数: 4)
平台
许可证MIT License
所有者活动
创建于2017-07-01 15:01:43
推送于2025-05-18 00:05:43
最后一次提交
发布数54
最新版本名称v7.0.2 (发布于 2024-11-21 17:02:17)
第一版名称v0.2.0 (发布于 )
用户参与
星数7.9k
关注者数54
派生数244
提交数1.5k
已启用问题?
问题数468
打开的问题数48
拉请求数562
打开的拉请求数14
关闭的拉请求数265
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?