Gathering detailed insights and metrics for purgecss
Gathering detailed insights and metrics for purgecss
Gathering detailed insights and metrics for purgecss
Gathering detailed insights and metrics for purgecss
npm install purgecss
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
7,802 Stars
1,502 Commits
248 Forks
55 Watching
8 Branches
76 Contributors
Updated on 25 Nov 2024
Minified
Minified + Gzipped
TypeScript (81.35%)
CSS (12.04%)
JavaScript (4.45%)
HTML (2.16%)
Cumulative downloads
Total Downloads
Last day
3.6%
155,051
Compared to previous day
Last week
4.8%
833,640
Compared to previous week
Last month
13.3%
3,451,080
Compared to previous month
Last year
-20.7%
38,130,721
Compared to previous year
4
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 find the PurgeCSS documentation on this website.
1npm install purgecss --save-dev
1import { PurgeCSS } from "purgecss"; 2const purgeCSSResults = await new PurgeCSS().purge({ 3 content: ["**/*.html"], 4 css: ["**/*.css"], 5});
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 | 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 |
No vulnerabilities found.
Reason
30 commit(s) and 6 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
security policy file detected
Details
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
SAST tool is run on all commits
Details
Reason
1 existing vulnerabilities detected
Details
Reason
Found 0/13 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More