{"id":17054701,"url":"https://github.com/dominikwilkowski/grunt-css-purge","last_synced_at":"2025-07-20T14:04:41.227Z","repository":{"id":19492801,"uuid":"22738865","full_name":"dominikwilkowski/grunt-css-purge","owner":"dominikwilkowski","description":"Grunt plugin to run CSS-Purge","archived":false,"fork":false,"pushed_at":"2018-06-25T01:07:21.000Z","size":68,"stargazers_count":9,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-20T23:18:12.106Z","etag":null,"topics":["clean-css","css-purge","grunt","grunt-plugin","minify-css","remove-duplicates"],"latest_commit_sha":null,"homepage":"http://rbtech.github.io/css-purge/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dominikwilkowski.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-08-07T22:47:54.000Z","updated_at":"2025-04-05T02:35:50.000Z","dependencies_parsed_at":"2022-08-21T08:11:22.560Z","dependency_job_id":null,"html_url":"https://github.com/dominikwilkowski/grunt-css-purge","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/dominikwilkowski/grunt-css-purge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dominikwilkowski%2Fgrunt-css-purge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dominikwilkowski%2Fgrunt-css-purge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dominikwilkowski%2Fgrunt-css-purge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dominikwilkowski%2Fgrunt-css-purge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dominikwilkowski","download_url":"https://codeload.github.com/dominikwilkowski/grunt-css-purge/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dominikwilkowski%2Fgrunt-css-purge/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266135685,"owners_count":23881803,"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":["clean-css","css-purge","grunt","grunt-plugin","minify-css","remove-duplicates"],"created_at":"2024-10-14T10:15:32.030Z","updated_at":"2025-07-20T14:04:41.210Z","avatar_url":"https://github.com/dominikwilkowski.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg alt=\"Grunt CSS Purge\" src=\"https://raw.githubusercontent.com/rbtech/css-purge/master/assets/images/grunt-css-purge.png\" width=\"133px\"\u003e\n\n\nGrunt CSS-PURGE\n===============\n\nPurges duplicate CSS rules and more. Based on [css-purge](https://www.npmjs.org/package/css-purge).\n\n\n## You have an issue?\n\nThis is a simple [grunt](http://gruntjs.com/) plugin, which means it’s a thin wrapper around `css-purge`. If you are having CSS issues, please\ncontact [css-purge](https://github.com/rbtech/css-purge/issues). Please only create a new issue if it looks like you’re having a problem with the grunt plugin.\n\n\n## Install\n\n```\nnpm install grunt-css-purge --save-dev\n```\n\n\n## Options\n\nVisit the [CSS-PURGE website](http://rbtech.github.io/css-purge)\n\n\n## Getting Started\n\nThis plugin requires Grunt.\n\nIf you haven’t used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide,\nas it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you’re familiar\nwith that process, you may install this plugin.\nOnce the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:\n\n```js\ngrunt.loadNpmTasks('grunt-css-purge');\n```\n\n\n## Example use cases\n\nThe most basic `Gruntfile.js` setup:\n\n```js\n'use strict';\n\nmodule.exports = function( grunt ) {\n\tgrunt.loadNpmTasks('grunt-css-purge');\n\n\tgrunt.initConfig({\n\t\tcss_purge: {\n\t\t\tsite: {\n\t\t\t\toptions: {},\n\t\t\t\tsrc: 'site.css',\n\t\t\t\tdest: 'site.min.css',\n\t\t\t},\n\t\t},\n\t});\n\n\tgrunt.registerTask('default', ['css_purge']);\n};\n```\n\nFor more infos about the options please look at the [CSS-Purge website](http://rbtech.github.io/css-purge/).\n\nSee below a couple different ways you can use the grunt task with various different files.\n\nA single file:\n\n```js\ndefault_options: {\n\toptions: {},\n\tsrc: 'site.css',\n\tdest: 'site.min.css',\n},\n```\n\nMultiple files:\n\n```js\nmultiple_files: {\n\toptions: {},\n\tsrc: [\n\t\t'site1.css',\n\t\t'site2.css',\n\t],\n\tdest: 'site.min.css',\n},\n```\n\nMultiple files:\n\n```js\nmultiple_files2: {\n\toptions: {},\n\tfiles: {\n\t\t'site.min.css': ['site1.css', 'site2.css'],\n\t},\n},\n```\n\nMultiple files with a wildcard:\n\n```js\nmultiple_files3: {\n\toptions: {},\n\tfiles: [{\n\t\tsrc: ['css/**/*.css'],\n\t\tdest: 'site.min.css',\n\t}],\n},\n```\n\nPurge a folder as is into multiple files:\n\n```js\nmultiple_files4: {\n\toptions: {},\n\tfiles: [{\n\t\texpand: true,\n\t\tcwd: \"css/\", // all *.css files inside the css/ folder will be purged\n\t\tsrc: \"*.css\",\n\t\tdest: \"output/\", //and placed into the output folder\n\t\text: \".min.css\",\n\t}],\n},\n```\n\nPurge a folder as is into multiple files while keeping sub-folder intact:\n\n```js\nmultiple_files5: {\n\toptions: {},\n\tfiles: [{\n\t\texpand: true,\n\t\tcwd: \"css/\",\n\t\tsrc: \"**/*.css\", // all *.css files in the css/ and it's sub-folders will be purged\n\t\tdest: \"output/\", //and placed into the output folder\n\t\text: \".min.css\",\n\t}],\n},\n```\n\nCustom options:\n\n```js\ncustom_options: {\n\toptions: {\n\t\ttrim_comments: false,\n\t\tgenerate_report: true,\n\t},\n\tsrc: 'site.css',\n\tdest: 'site.min.css',\n},\n```\n\n\n## Contributing\n\nIn lieu of a formal styleguide, take care to maintain the existing coding style.\n\n\n## Release History\n\n* 1.1.0 - Mad task async\n* 1.0.2 - Fixed to major `css-purge` version\n* 1.0.1 - Reduced dependencies\n* 1.0.0 - Updated to CSS-Purge 3.0.0\n* 0.0.4 - Updated peerDependencies for grunt 1.0\n* 0.0.3 - updated license\n* 0.0.2 - refinements\n* 0.0.1 - alpha test\n\n\n## License\n\nCopyright (c) 2018 Dominik Wilkowski. Licensed under the GPLv2 license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdominikwilkowski%2Fgrunt-css-purge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdominikwilkowski%2Fgrunt-css-purge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdominikwilkowski%2Fgrunt-css-purge/lists"}