{"id":13880768,"url":"https://github.com/google/postcss-rename","last_synced_at":"2025-04-04T23:10:07.620Z","repository":{"id":40201843,"uuid":"222571669","full_name":"google/postcss-rename","owner":"google","description":"Replace class names based on a customizable renaming scheme.","archived":false,"fork":false,"pushed_at":"2024-06-18T05:22:37.000Z","size":12829,"stargazers_count":145,"open_issues_count":3,"forks_count":19,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-28T22:14:46.895Z","etag":null,"topics":["css","postcss","postcss-plugin"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/google.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-19T00:23:21.000Z","updated_at":"2025-03-27T09:08:00.000Z","dependencies_parsed_at":"2024-01-13T20:58:37.658Z","dependency_job_id":"711194eb-965a-4340-869f-65dbd1365c6f","html_url":"https://github.com/google/postcss-rename","commit_stats":{"total_commits":520,"total_committers":41,"mean_commits":"12.682926829268293","dds":0.6634615384615384,"last_synced_commit":"69a402f51f295689b78378ab0b5419d657b34989"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fpostcss-rename","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fpostcss-rename/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fpostcss-rename/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fpostcss-rename/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/google","download_url":"https://codeload.github.com/google/postcss-rename/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247261612,"owners_count":20910108,"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","postcss","postcss-plugin"],"created_at":"2024-08-06T08:03:28.050Z","updated_at":"2025-04-04T23:10:07.586Z","avatar_url":"https://github.com/google.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"[![Build status](https://github.com/google/postcss-rename/actions/workflows/ci.yml/badge.svg)](https://github.com/google/postcss-rename/actions)\n\nA [PostCSS](https://github.com/postcss/postcss) plugin to replace class names\nbased on a customizable renaming scheme.\n\n* [Usage](#usage)\n* [Options](#options)\n  * [`strategy`](#strategy)\n  * [`by`](#by)\n  * [`prefix`](#prefix)\n  * [`except`](#except)\n  * [`ids`](#ids)\n  * [`outputMapCallback`](#outputMapCallback)\n\n## Usage\n\n`postcss-rename` makes it possible to rename CSS class names in the generated\nstylesheet, which helps reduce the size of the CSS that is sent down to your\nusers. It's designed to be used along with a plugin for a build system like\nWebpack that can rewrite HTML templates and/or references in JS. If you write\nsuch a plugin, let us know and we'll link it here!\n\n## Options\n\n### `strategy`\n\nThe renaming strategy to use:\n\n* `\"none\"`: Don't change names at all. This is the default strategy.\n\n* `\"debug\"`: Add an underscore at the end of each name. This is useful for\n  keeping classes readable during debugging while still verifying that your\n  templates and JavaScript aren't accidentally using non-renamed classes.\n\n* `\"minimal\"`: Use the shortest possible names, in order of appearance: the\n  first class is renamed to `.a`, the second to `.b`, and so on.\n\nThis can also be a function that takes a CSS name (the full name in by-whole\nmode and the part in by-part mode) and returns its renamed value.\n\n### `by`\n\nWhether to rename in \"by-whole mode\" or \"by-part mode\".\n\n* `\"whole\"`: Rename the entire name at once, so for example `.tall-image` might\n  become `.a`. This is the default mode.\n\n* `\"part\"`: Rename each hyphenated section of a name separately, so for example\n  `.tall-image` might become `.a-b`.\n\n### `prefix`\n\nA string prefix to add before every renamed class. This applies even if\n[`strategy`](#strategy) is set to `none`.\n\nIn by-part mode, the prefix is applied to the entire class, but it isn't\nincluded in the [output map](#outputMapCallback).\n\n### `except`\n\nAn array (or other `Iterable`) of names that shouldn't be renamed.\n\n### `ids`\n\nWhether to rename ID selectors as well as class selectors. Defaults to `false`.\n\n### `outputMapCallback`\n\nA callback that's passed a map from original class names to their renamed\nequivalents, so that an HTML template or JS class references can also be\nrenamed.\n\nIn by-part mode, this contains separate entries for each part of a class name.\nIt doesn't contain any names that weren't renamed because of\n[`except`](#except).\n\nDisclaimer: This is not an officially supported Google product.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogle%2Fpostcss-rename","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoogle%2Fpostcss-rename","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogle%2Fpostcss-rename/lists"}