Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Remove unused CSS

License

NotificationsYou must be signed in to change notification settings

FullHuman/purgecss

npmnpmGitHubDependabot

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

Sponsors 🥰

Documentation

You can find the PurgeCSS documentation onthis website.

Table of Contents

PurgeCSS

Plugins

Guides

Getting Started

Installation

npm install purgecss --save-dev

Usage

import{PurgeCSS}from"purgecss";constpurgeCSSResults=awaitnewPurgeCSS().purge({content:["**/*.html"],css:["**/*.css"],});

Packages

This repository is a monorepo that we manage usingLerna. That means that we actually publishseveral packages to npm from the same codebase, including:

PackageVersionDescription
purgecssnpmThe core of PurgeCSS
postcss-purgecssnpm (scoped)PostCSS plugin for PurgeCSS
purgecss-webpack-pluginnpmWebpack plugin for PurgeCSS
gulp-purgecssnpmGulp plugin for PurgeCSS
grunt-purgecssnpmGrunt plugin for PurgeCSS
rollup-plugin-purgecssnpmRollup plugin for PurgeCSS
purgecss-from-htmlnpmHtml extractor for PurgeCSS
purgecss-from-pugnpmPug extractor for PurgeCSS
purgecss-with-wordpressnpmCollection of safelist items for WordPress
vue-cli-plugin-purgecssnpmVue CLI Plugin for PurgeCSS

Sponsor this project

 

Packages

 
 
 

[8]ページ先頭

©2009-2025 Movatter.jp