purgecss

Remove unused css selectors

purgecss downloads purgecss version purgecss license

purgecss類似套件:
npm下載趨勢
3 年
🌟 在 purgecss 的 README.md 中顯示即時使用量圖表,只需複製下面的代碼。
## Usage Trend
[![Usage Trend of purgecss](https://npm-compare.com/img/npm-trend/THREE_YEARS/purgecss.png)](https://npm-compare.com/purgecss#timeRange=THREE_YEARS)
Cumulative GitHub Star Trend
🌟 在 purgecss 的 README.md 中顯示 GitHub stars 趨勢圖表,只需複製下面的代碼。
## GitHub Stars Trend
[![GitHub Stars Trend of purgecss](https://npm-compare.com/img/github-trend/purgecss.png)](https://npm-compare.com/purgecss)
統計詳情
套件
下載數
Stars
大小
Issues
發布時間
許可
purgecss741,7167,979135 kB601 年前MIT
purgecss 的 README

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.