AI Decision System
Replayable, offline-verifiable records for AI-assisted go/no-go decisions: experiment promotions, typed model answers and human-approved actions.
翻譯準備中
Remove unused CSS
翻譯準備中
開發工具TypeScript · CSSGitHub @FullHuman自行安裝營運者未確認
試用過了嗎? 點一下就好,不需要登入。
製作者的介紹僅有上面的一句話。 更多詳情請閱讀儲存庫 README。 儲存庫 README ↗
正在載入完整 README。
檢視完整 README ↗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.
You can try PurgeCSS online at purgecss.full-human.com.
You can find the PurgeCSS documentation on this website.
npm install purgecss --save-dev
import { PurgeCSS } from "purgecss";
const purgeCSSResults = await new PurgeCSS().purge({
content: ["**/*.html"],
css: ["**/*.css"],
});
This repository is a monorepo that we manage using pnpm workspaces and Changesets. That means that we actually publish several packages to npm from the same codebase, including:
| Package | Version | Description |
|---|---|---|
| purgecss | The core of PurgeCSS | |
| postcss-purgecss | PostCSS plugin for PurgeCSS | |
| purgecss-webpack-plugin | Webpack plugin for PurgeCSS | |
| gulp-purgecss | Gulp plugin for PurgeCSS | |
| grunt-purgecss | Grunt plugin for PurgeCSS | |
| rollup-plugin-purgecss | Rollup plugin for PurgeCSS | |
| purgecss-from-html | Html extractor for PurgeCSS | |
| purgecss-from-pug | Pug extractor for PurgeCSS | |
| purgecss-with-wordpress | Collection of safelist items for WordPress | |
| vue-cli-plugin-purgecss | Vue CLI Plugin for PurgeCSS |