{"id":17696613,"url":"https://github.com/minagishl/postcss-classname-obfuscator","last_synced_at":"2026-01-23T06:47:43.980Z","repository":{"id":218142641,"uuid":"745721433","full_name":"minagishl/postcss-classname-obfuscator","owner":"minagishl","description":"This PostCSS plugin replaces CSS class names with hard-to-guess characters.","archived":false,"fork":false,"pushed_at":"2025-11-24T13:49:06.000Z","size":4814,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-28T02:50:41.419Z","etag":null,"topics":["obfuscate","postcss","postcss-plugin","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/postcss-classname-obfuscator","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/minagishl.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":"https://www.amazon.jp/hz/wishlist/ls/4PK5XV6L033Z"}},"created_at":"2024-01-20T00:28:56.000Z","updated_at":"2025-11-24T13:49:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"a571369d-301c-400b-8715-881745285da7","html_url":"https://github.com/minagishl/postcss-classname-obfuscator","commit_stats":null,"previous_names":["minagishl/postcss-classname-obfuscator"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/minagishl/postcss-classname-obfuscator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minagishl%2Fpostcss-classname-obfuscator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minagishl%2Fpostcss-classname-obfuscator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minagishl%2Fpostcss-classname-obfuscator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minagishl%2Fpostcss-classname-obfuscator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/minagishl","download_url":"https://codeload.github.com/minagishl/postcss-classname-obfuscator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minagishl%2Fpostcss-classname-obfuscator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28682261,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T05:48:07.525Z","status":"ssl_error","status_checked_at":"2026-01-23T05:48:07.129Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["obfuscate","postcss","postcss-plugin","typescript"],"created_at":"2024-10-24T14:44:49.701Z","updated_at":"2026-01-23T06:47:43.964Z","avatar_url":"https://github.com/minagishl.png","language":"TypeScript","funding_links":["https://www.amazon.jp/hz/wishlist/ls/4PK5XV6L033Z"],"categories":[],"sub_categories":[],"readme":"# postcss-classname-obfuscator\n\nThis PostCSS plugin replaces CSS class names with hard-to-guess characters.\n\n\u003e The `.next` folder may not work properly if present.  \n\u003e We are currently checking for bugs. Please let us know as soon as you figure out how to reproduce the bug.  \n\u003e Demo site: https://postcss-classname-obfuscator-demo.vercel.app/  \n\u003e Demo repository: https://github.com/minagishl/postcss-classname-obfuscator-demo\n\nIf you cannot access the site [./screenshot.png](./screenshot.png)\n\n```css\n.primary {\n  color: var(--primary);\n}\n\n.secondary {\n  color: var(--secondary);\n}\n```\n\n```css\n.b6d946 {\n  color: var(--primary);\n}\n\n.d6bdb8 {\n  color: var(--secondary);\n}\n```\n\n## Usage\n\n**Step 1:** Install plugin:\n\n```bash\nnpm install --save-dev postcss postcss-classname-obfuscator\n```\n\n**Step 2:** Check your project for existing PostCSS config: `postcss.config.js`\nin the project root, `\"postcss\"` section in `package.json`\nor `postcss` in bundle config.\n\nIf you do not use PostCSS, add it according to [official docs]\nand set this plugin in settings.\n\n**Step 3:** Add the plugin to plugins list:\n\n```diff\nmodule.exports = {\n  plugins: {\n    autoprefixer: {},\n+   'postcss-classname-obfuscator': {},\n  },\n};\n```\n\n## Options\n\n| Option          | Type                | Default                 | Description                                                           |\n| --------------- | ------------------- | ----------------------- | --------------------------------------------------------------------- |\n| type            | string              | \"nextjs\"                | \"nextjs\" - Application-specific directories Only supported by Next.js |\n| enable          | boolean             | true                    | Enable or disable the obfuscation.                                    |\n| length          | number              | 6                       | Character length (max. 32 characters)length.                          |\n| method          | string              | \"random\"                | \"random\" or \"none\" obfuscation method for classes.                    |\n| prefix          | string              | \"\"                      | Prefix for custom properties.                                         |\n| suffix          | string              | \"\"                      | Suffix for custom properties.                                         |\n| ignore          | string[]            | []                      | Array of custom properties to ignore.                                 |\n| output          | string              | \"\"                      | Obfuscated property list json file output destination                 |\n| directory       | string              | \"\"                      | Directory to replace obfuscated class names                           |\n| [new] inputJson | string              | \"\"                      | The json output by output is available.                               |\n| ignoreRegex     | string[]            | []                      | Regex to ignore.                                                      |\n| hashAlgorithm   | string              | \"sha256\"                | Hash algorithm for obfuscation.                                       |\n| preRun          | () =\u003e Promise\u003cvoid\u003e | () =\u003e Promise.resolve() | What to do before running the plugin                                  |\n| callBack        | () =\u003e void          | function () {}          | Callback function to run after the plugin has finished running        |\n\n## License\n\nThis source code is released under the [MIT license.]\n\n[MIT license.]: https://opensource.org/licenses/MIT\n[official docs]: https://github.com/postcss/postcss#usage\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminagishl%2Fpostcss-classname-obfuscator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fminagishl%2Fpostcss-classname-obfuscator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminagishl%2Fpostcss-classname-obfuscator/lists"}