{"id":24983657,"url":"https://github.com/posthtml/posthtml-postcss-treeshaker","last_synced_at":"2025-03-29T10:12:37.899Z","repository":{"id":40767652,"uuid":"263683170","full_name":"posthtml/posthtml-postcss-treeshaker","owner":"posthtml","description":"posthtml plugin to tree shake css styles using postcss","archived":false,"fork":false,"pushed_at":"2023-01-06T06:46:15.000Z","size":2114,"stargazers_count":3,"open_issues_count":16,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-29T21:06:06.936Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/posthtml-postcss-treeshaker","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/posthtml.png","metadata":{"files":{"readme":"readme.md","changelog":"CHANGELOG.md","contributing":"contributing.md","funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-13T16:22:09.000Z","updated_at":"2021-03-31T03:21:24.000Z","dependencies_parsed_at":"2023-02-05T13:45:23.730Z","dependency_job_id":null,"html_url":"https://github.com/posthtml/posthtml-postcss-treeshaker","commit_stats":null,"previous_names":["anikethsaha/posthtml-postcss-treeshaker"],"tags_count":3,"template":false,"template_full_name":"posthtml/posthtml-plugin-boilerplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posthtml%2Fposthtml-postcss-treeshaker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posthtml%2Fposthtml-postcss-treeshaker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posthtml%2Fposthtml-postcss-treeshaker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posthtml%2Fposthtml-postcss-treeshaker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/posthtml","download_url":"https://codeload.github.com/posthtml/posthtml-postcss-treeshaker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245462426,"owners_count":20619477,"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":[],"created_at":"2025-02-04T09:20:03.872Z","updated_at":"2025-03-29T10:12:37.861Z","avatar_url":"https://github.com/posthtml.png","language":"JavaScript","readme":"# posthtml-postcss-treeshaker\n\nA `posthtml` plugin to treeshake class and id styling in `style` tag on html page using `postcss`\n\n\n[![NPM][npm]][npm-url]\n[![Deps][deps]][deps-url]\n[![Build][build]][build-badge]\n[![Standard Code Style][style]][style-url]\n[![Chat][chat]][chat-badge]\n\nThis plugin is used for reducing your file size\n\n\u003e Experimental - Work in progress\n\nBefore:\n\n```html\n\u003chtml\u003e\n  \u003cbody\u003e\n    \u003cp class=\"used\"\u003eHELLO\u003c/p\u003e\n    \u003cstyle\u003e\n      .used {\n        color: red;\n      }\n      .unused {\n        color: green;\n      }\n    \u003c/style\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\nAfter:\n\n```html\n\u003chtml\u003e\n  \u003cbody\u003e\n    \u003cp class=\"used\"\u003eHELLO\u003c/p\u003e\n    \u003cstyle\u003e\n      .used {\n        color: red;\n      }\n    \u003c/style\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\n## Install\n\n\u003e npm i posthtml posthtml-postcss-treeshaker\n\n## Usage\n\nDescribe how people can use this plugin. Include info about build systems if it's\nnecessary.\n\n```js\nconst fs = require(\"fs\");\nconst posthtml = require(\"posthtml\");\nconst posthtmlPlugin = require(\"posthtml-postcss-treeshaker\");\n\nposthtml()\n  .use(\n    posthtmlPlugin({\n      /* options */\n    })\n  )\n  .process(html /*, options */)\n  .then(result =\u003e fs.writeFileSync(\"./after.html\", result.html));\n```\n\n### Contributing\n\nSee [PostHTML Guidelines](https://github.com/posthtml/posthtml/tree/master/docs) and [contribution guide](CONTRIBUTING.md).\n\n### License [MIT](LICENSE)\n\n[npm]: https://img.shields.io/npm/v/posthtml-postcss-treeshaker.svg\n[npm-url]: https://npmjs.com/package/posthtml-postcss-treeshaker\n[deps]: https://david-dm.org/posthtml/posthtml-postcss-treeshaker.svg\n[deps-url]: https://david-dm.org/anikethsaha/posthtml-postcss-treeshaker\n[style]: https://img.shields.io/badge/code%20style-standard-yellow.svg\n[style-url]: http://standardjs.com/\n[build]: https://travis-ci.org/posthtml/posthtml-postcss-treeshaker.svg?branch=master\n[build-badge]: https://travis-ci.org/posthtml/posthtml?branch=master\n[chat]: https://badges.gitter.im/posthtml/posthtml-postcss-treeshaker.svg\n[chat-badge]: https://gitter.im/posthtml/posthtml?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge\"\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposthtml%2Fposthtml-postcss-treeshaker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fposthtml%2Fposthtml-postcss-treeshaker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposthtml%2Fposthtml-postcss-treeshaker/lists"}