{"id":13398048,"url":"https://github.com/FullHuman/purgecss","last_synced_at":"2025-03-14T00:32:54.972Z","repository":{"id":37385213,"uuid":"95970824","full_name":"FullHuman/purgecss","owner":"FullHuman","description":"Remove unused CSS","archived":false,"fork":false,"pushed_at":"2024-12-14T22:33:54.000Z","size":25589,"stargazers_count":7821,"open_issues_count":49,"forks_count":248,"subscribers_count":55,"default_branch":"main","last_synced_at":"2024-12-27T02:02:56.520Z","etag":null,"topics":["css","optimization-tools","postcss","postcss-plugin","purgecss","rollup-plugin","webpack-plugin"],"latest_commit_sha":null,"homepage":"https://purgecss.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FullHuman.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["Ffloriel"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2017-07-01T15:01:43.000Z","updated_at":"2024-12-26T15:43:15.000Z","dependencies_parsed_at":"2022-07-09T06:16:18.791Z","dependency_job_id":"8100d875-7195-4339-9163-0f42c4ab9645","html_url":"https://github.com/FullHuman/purgecss","commit_stats":{"total_commits":1270,"total_committers":90,"mean_commits":14.11111111111111,"dds":0.6574803149606299,"last_synced_commit":"4b054e4034a1d04bd52cc8658949a9ab5bcd986a"},"previous_names":[],"tags_count":54,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FullHuman%2Fpurgecss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FullHuman%2Fpurgecss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FullHuman%2Fpurgecss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FullHuman%2Fpurgecss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FullHuman","download_url":"https://codeload.github.com/FullHuman/purgecss/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237894132,"owners_count":19383160,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["css","optimization-tools","postcss","postcss-plugin","purgecss","rollup-plugin","webpack-plugin"],"created_at":"2024-07-30T18:02:03.870Z","updated_at":"2025-03-14T00:32:53.382Z","avatar_url":"https://github.com/FullHuman.png","language":"TypeScript","readme":"# PurgeCSS\n\n[![npm](https://img.shields.io/npm/v/purgecss?style=for-the-badge)](https://www.npmjs.com/package/purgecss)\n![npm](https://img.shields.io/npm/dm/purgecss?style=for-the-badge)\n![GitHub](https://img.shields.io/github/license/FullHuman/purgecss?style=for-the-badge)\n![Dependabot](https://img.shields.io/badge/dependabot-enabled-%23024ea4?style=for-the-badge)\n\n\u003cp align=\"center\"\u003e\n\t\u003cimg src=\"https://i.imgur.com/UEiUiJ0.png\" height=\"200\" width=\"200\" alt=\"PurgeCSS logo\"/\u003e\n\u003c/p\u003e\n\n## What is PurgeCSS?\n\nWhen 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.\n\nThis 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.\n\n## Sponsors 🥰\n\n[\u003cimg src=\"https://avatars0.githubusercontent.com/u/67109815?v=4\" height=\"85\" style=\"margin-right: 10px\"\u003e](https://tailwindcss.com)\n[\u003cimg src=\"https://avatars.githubusercontent.com/u/133211198?v=4\" height=\"85\" style=\"margin-right: 10px\"\u003e](https://www.bairesdev.com/sponsoring-open-source-projects/)\n\n## Documentation\n\nYou can find the PurgeCSS documentation on [this website](https://purgecss.com).\n\n### Table of Contents\n\n#### PurgeCSS\n\n- [Configuration](https://purgecss.com/configuration.html)\n- [Command Line Interface](https://purgecss.com/CLI.html)\n- [Programmatic API](https://purgecss.com/api.html)\n- [Safelisting](https://purgecss.com/safelisting.html)\n- [Extractors](https://purgecss.com/extractors.html)\n- [Comparison](https://purgecss.com/comparison.html)\n\n#### Plugins\n\n- [PostCSS](https://purgecss.com/plugins/postcss.html)\n- [Webpack](https://purgecss.com/plugins/webpack.html)\n- [Gulp](https://purgecss.com/plugins/gulp.html)\n- [Grunt](https://purgecss.com/plugins/grunt.html)\n- [Gatsby](https://purgecss.com/plugins/gatsby.html)\n\n#### Guides\n\n- [Vue.js](https://purgecss.com/guides/vue.html)\n- [Nuxt.js](https://purgecss.com/guides/nuxt.html)\n- [React.js](https://purgecss.com/guides/react.html)\n- [Next.js](https://purgecss.com/guides/next.html)\n- [Razzle](https://purgecss.com/guides/razzle.html)\n- [Hugo](https://purgecss.com/guides/hugo.html)\n\n## Getting Started\n\n#### Installation\n\n```sh\nnpm install purgecss --save-dev\n```\n\n## Usage\n\n```js\nimport { PurgeCSS } from \"purgecss\";\nconst purgeCSSResults = await new PurgeCSS().purge({\n  content: [\"**/*.html\"],\n  css: [\"**/*.css\"],\n});\n```\n\n## Packages\n\nThis repository is a monorepo that we manage using [Lerna](https://github.com/lerna/lerna). That means that we actually publish [several packages](/packages) to npm from the same codebase, including:\n\n| Package                                                      | Version                                                                                     | Description                                |\n| ------------------------------------------------------------ | ------------------------------------------------------------------------------------------- | ------------------------------------------ |\n| [purgecss](/packages/purgecss)                               | ![npm](https://img.shields.io/npm/v/purgecss?style=flat-square)                             | The core of PurgeCSS                       |\n| [postcss-purgecss](/packages/postcss-purgecss)               | ![npm (scoped)](https://img.shields.io/npm/v/@fullhuman/postcss-purgecss?style=flat-square) | PostCSS plugin for PurgeCSS                |\n| [purgecss-webpack-plugin](/packages/purgecss-webpack-plugin) | ![npm](https://img.shields.io/npm/v/purgecss-webpack-plugin?style=flat-square)              | Webpack plugin for PurgeCSS                |\n| [gulp-purgecss](/packages/gulp-purgecss)                     | ![npm](https://img.shields.io/npm/v/gulp-purgecss?style=flat-square)                        | Gulp plugin for PurgeCSS                   |\n| [grunt-purgecss](/packages/grunt-purgecss)                   | ![npm](https://img.shields.io/npm/v/grunt-purgecss?style=flat-square)                       | Grunt plugin for PurgeCSS                  |\n| [rollup-plugin-purgecss](/packages/rollup-plugin-purgecss)   | ![npm](https://img.shields.io/npm/v/rollup-plugin-purgecss?style=flat-square)               | Rollup plugin for PurgeCSS                 |\n| [purgecss-from-html](/packages/purgecss-from-html)           | ![npm](https://img.shields.io/npm/v/purgecss-from-html?style=flat-square)                   | Html extractor for PurgeCSS                |\n| [purgecss-from-pug](/packages/purgecss-from-pug)             | ![npm](https://img.shields.io/npm/v/purgecss-from-pug?style=flat-square)                    | Pug extractor for PurgeCSS                 |\n| [purgecss-with-wordpress](/packages/purgecss-with-wordpress) | ![npm](https://img.shields.io/npm/v/purgecss-with-wordpress?style=flat-square)              | Collection of safelist items for WordPress |\n| [vue-cli-plugin-purgecss](/packages/vue-cli-plugin-purgecss) | ![npm](https://img.shields.io/npm/v/@fullhuman/vue-cli-plugin-purgecss?style=flat-square)   | Vue CLI Plugin for PurgeCSS                |\n","funding_links":["https://github.com/sponsors/Ffloriel"],"categories":["JavaScript","TypeScript","CSS","目录"],"sub_categories":["References","Performance"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFullHuman%2Fpurgecss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FFullHuman%2Fpurgecss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFullHuman%2Fpurgecss/lists"}