{"id":17696607,"url":"https://github.com/minagishl/postcss-obfuscate-custom-properties","last_synced_at":"2025-07-12T06:33:26.887Z","repository":{"id":211481928,"uuid":"729292373","full_name":"minagishl/postcss-obfuscate-custom-properties","owner":"minagishl","description":"This PostCSS plugin replaces the names of custom properties with hard-to-guess characters","archived":false,"fork":false,"pushed_at":"2025-01-25T16:45:38.000Z","size":84,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-01T19:53:44.025Z","etag":null,"topics":["obfuscate","postcss","postcss-plugin","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/postcss-obfuscate-custom-properties","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://minagishl.com/amazon-wishlist"}},"created_at":"2023-12-08T20:32:31.000Z","updated_at":"2025-01-25T16:45:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"b488817c-0e68-493d-834f-93c2dc1515b1","html_url":"https://github.com/minagishl/postcss-obfuscate-custom-properties","commit_stats":null,"previous_names":["minagishl/postcss-obfuscate-custom-properties"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/minagishl/postcss-obfuscate-custom-properties","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minagishl%2Fpostcss-obfuscate-custom-properties","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minagishl%2Fpostcss-obfuscate-custom-properties/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minagishl%2Fpostcss-obfuscate-custom-properties/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minagishl%2Fpostcss-obfuscate-custom-properties/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/minagishl","download_url":"https://codeload.github.com/minagishl/postcss-obfuscate-custom-properties/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minagishl%2Fpostcss-obfuscate-custom-properties/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264951610,"owners_count":23687974,"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":["obfuscate","postcss","postcss-plugin","typescript"],"created_at":"2024-10-24T14:44:48.930Z","updated_at":"2025-07-12T06:33:26.863Z","avatar_url":"https://github.com/minagishl.png","language":"TypeScript","funding_links":["https://minagishl.com/amazon-wishlist"],"categories":[],"sub_categories":[],"readme":"# postcss-obfuscate-custom-properties\n\nThis plugin replaces the names of CSS custom properties with hard-to-guess strings.\n\n```css\n:root {\n  --primary: 240 5.9% 10%;\n  --secondary: 240 4.8% 95.9%;\n}\n```\n\n```css\n:root {\n  --b6d946: 240 5.9% 10%;\n  --f02024: 240 4.8% 95.9%;\n}\n```\n\n## Usage\n\n**Step 1:** Install plugin:\n\n```bash\nnpm install --save-dev postcss postcss-obfuscate-custom-properties\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-obfuscate-custom-properties': {},\n  },\n};\n```\n\n## Options\n\n| Option               | Type                | Default                 | Description                                                    |\n| -------------------- | ------------------- | ----------------------- | -------------------------------------------------------------- |\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| speedPriority        | boolean             | false                   | Ignore all regular expressions and execute.                    |\n| ignoreRegex          | string[]            | []                      | Regex to ignore.                                               |\n| ignoreSelectors      | string[]            | []                      | Array of selectors to ignore.                                  |\n| IgnoreSelectorsRegex | string[]            | []                      | Regex to ignore selectors.                                     |\n| [new] 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-obfuscate-custom-properties","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fminagishl%2Fpostcss-obfuscate-custom-properties","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminagishl%2Fpostcss-obfuscate-custom-properties/lists"}