{"id":16931303,"url":"https://github.com/leodido/postcss-clean","last_synced_at":"2025-03-17T07:32:12.197Z","repository":{"id":49185766,"uuid":"53154277","full_name":"leodido/postcss-clean","owner":"leodido","description":"PostCss plugin to minify your CSS with clean-css","archived":false,"fork":false,"pushed_at":"2022-12-06T20:14:32.000Z","size":223,"stargazers_count":41,"open_issues_count":12,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-14T20:43:45.291Z","etag":null,"topics":["clean-css","css","es2015","hacktoberfest","javascript","minification","minify","optimizer","postcss","postcss-plugin"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/leodido.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2016-03-04T17:44:20.000Z","updated_at":"2021-10-24T17:17:03.000Z","dependencies_parsed_at":"2023-01-23T15:01:31.873Z","dependency_job_id":null,"html_url":"https://github.com/leodido/postcss-clean","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leodido%2Fpostcss-clean","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leodido%2Fpostcss-clean/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leodido%2Fpostcss-clean/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leodido%2Fpostcss-clean/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leodido","download_url":"https://codeload.github.com/leodido/postcss-clean/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221674186,"owners_count":16861786,"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","es2015","hacktoberfest","javascript","minification","minify","optimizer","postcss","postcss-plugin"],"created_at":"2024-10-13T20:43:41.757Z","updated_at":"2024-10-27T12:15:37.412Z","avatar_url":"https://github.com/leodido.png","language":"JavaScript","readme":"# [postcss][postcss]-clean ![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/leodido/postcss-clean/build/master?style=flat-square) [![NPM](https://img.shields.io/npm/v/postcss-clean.svg?style=flat-square)][npm] [![Coveralls branch](https://img.shields.io/coveralls/leodido/postcss-clean/master.svg?style=flat-square)](https://coveralls.io/r/leodido/postcss-clean?branch=master) [![NPM Monthly Downloads](https://img.shields.io/npm/dm/postcss-clean.svg?style=flat-square)][npm]\n\n\u003e PostCss plugin to minify your CSS\n\nCompression will be handled by **[clean-css][clean-css]**, which according to [this benchmark](http://goalsmashers.github.io/css-minification-benchmark) is one of the top (probably the best) libraries for minifying CSS.\n\n## Install\n\nWith [npm](https://npmjs.org/package/postcss-clean) do:\n\n```\nnpm install postcss-clean --save\n```\n\n## Example\n\n### Input\n\n```css\n.try {\n  color: #607d8b;\n  width: 32px;\n}\n```\n\n### Output\n\n```css\n.try{color:#607d8b;width:32px}\n```\n\n### Input\n\n```css\n:host {\n  display: block;\n}\n\n:host ::content {\n  \u0026 \u003e * {\n    color: var(--primary-color);\n  }\n}\n```\n\n### Output\n\n```css\n:host{display:block}:host ::content\u003e*{color:var(--my-color)}\n```\n\n**Note** this example assumes you combined postcss-clean with other plugins (e.g. [postcss-nesting][postcss-nesting]).\n\n## API\n\n### `clean([options])`\n\nNote that **postcss-clean** is an asynchronous processor. It cannot be used like this:\n\n```javascript\nvar out = postcss([ clean() ]).process(css).css;\nconsole.log(out)\n```\n\nInstead make sure your runner uses the async APIs:\n\n```javascript\npostcss([ clean() ]).process(css).then(function(out) {\n    console.log(out.css);\n});\n```\n\n#### options\n\nIt simply proxies the [clean-css][clean-css] options. See the complete list of options [here][clean-css-opts].\n\n## Usage\n\nSee the [PostCSS documentation](https://github.com/postcss/postcss#usage) for examples for your environment.\n\n## Contributing\n\nPull requests are welcome.\n\n## License\n\nMIT © Leonardo Di Donato\n\n---\n\n[![Analytics](https://ga-beacon.appspot.com/UA-49657176-1/postcss-clean?flat)](https://github.com/igrigorik/ga-beacon)\n\n[clean-css]:       http://github.com/jakubpawlowicz/clean-css\n[clean-css-opts]:  https://github.com/jakubpawlowicz/clean-css/tree/3.4#how-to-use-clean-css-api\n[ci]:              https://travis-ci.org/leodido/postcss-clean\n[deps]:            https://gemnasium.com/leodido/postcss-clean\n[postcss]:         https://github.com/postcss/postcss\n[postcss-nesting]: https://github.com/jonathantneal/postcss-nesting\n[npm]:             https://www.npmjs.com/package/postcss-clean\n","funding_links":[],"categories":["CSS3"],"sub_categories":["PostCSS"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleodido%2Fpostcss-clean","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleodido%2Fpostcss-clean","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleodido%2Fpostcss-clean/lists"}