{"id":19125131,"url":"https://github.com/shoonia/gatsby-plugin-mini-css-class-name","last_synced_at":"2025-05-05T20:14:06.644Z","repository":{"id":35206157,"uuid":"215332990","full_name":"shoonia/gatsby-plugin-mini-css-class-name","owner":"shoonia","description":"Minifying CSS class names","archived":false,"fork":false,"pushed_at":"2024-07-09T20:35:47.000Z","size":2531,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-16T07:15:54.592Z","etag":null,"topics":["classname","css","gatsby-plugin","minify"],"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/shoonia.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2019-10-15T15:28:16.000Z","updated_at":"2024-07-09T20:35:17.000Z","dependencies_parsed_at":"2023-02-13T23:31:30.906Z","dependency_job_id":"d791e00f-dd25-4708-a4d8-eb4b18828164","html_url":"https://github.com/shoonia/gatsby-plugin-mini-css-class-name","commit_stats":{"total_commits":51,"total_committers":3,"mean_commits":17.0,"dds":0.196078431372549,"last_synced_commit":"d41c8d7064f261bbe7bc6e92bc8138bc1c28002e"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shoonia%2Fgatsby-plugin-mini-css-class-name","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shoonia%2Fgatsby-plugin-mini-css-class-name/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shoonia%2Fgatsby-plugin-mini-css-class-name/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shoonia%2Fgatsby-plugin-mini-css-class-name/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shoonia","download_url":"https://codeload.github.com/shoonia/gatsby-plugin-mini-css-class-name/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252569646,"owners_count":21769517,"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":["classname","css","gatsby-plugin","minify"],"created_at":"2024-11-09T05:34:39.755Z","updated_at":"2025-05-05T20:14:06.613Z","avatar_url":"https://github.com/shoonia.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gatsby-plugin-mini-css-class-name\n\n[![test](https://github.com/shoonia/gatsby-plugin-mini-css-class-name/actions/workflows/test.yml/badge.svg)](https://github.com/shoonia/gatsby-plugin-mini-css-class-name/actions/workflows/test.yml)\n[![npm version](https://img.shields.io/npm/v/gatsby-plugin-mini-css-class-name.svg)](https://www.npmjs.com/package/gatsby-plugin-mini-css-class-name)\n\nMinifying CSS class names if using [CSS Modules](https://www.gatsbyjs.org/docs/css-modules/).\n\n```diff\n- \u003cp class=\"post-module--text--w-3Tg\"\u003eHello\u003c/p\u003e\n+ \u003cp class=\"a\"\u003eHello\u003c/p\u003e\n```\n\n## Install\n```bash\nnpm i gatsby-plugin-mini-css-class-name\n#or\nyarn add gatsby-plugin-mini-css-class-name\n```\n\n## How to use\n```js\n// In your gatsby-config.js\nmodule.exports = {\n  plugins: [`gatsby-plugin-mini-css-class-name`],\n}\n```\nIf you need to pass plugin [options](#options):\n```js\n// In your gatsby-config.js\nmodule.exports = {\n  plugins: [\n    {\n      resolve: `gatsby-plugin-mini-css-class-name`,\n      options: {\n        prefix: `x-`,\n      },\n    },\n  ],\n}\n```\n\n\u003e ⚠️ This plugin must be the last plugin witch work with CSS in your `gatsby-config.js`. This plugin contributes change to Webpack config and other plugins can delete the changes.\n\n```js\n// In your gatsby-config.js\nmodule.exports = {\n  plugins: [\n    `gatsby-plugin-postcss`,\n    `gatsby-plugin-mini-css-class-name`, // after PostCSS\n  ],\n}\n```\n\n## Options\n|    Name          |   Type     | Default | Description |\n|:----------------:|:----------:|:-------:|:-----------:|\n| **prefix**       | `{String}` |  `\"\"`   | A custom prefix will be added to each class name\n| **suffix**       | `{String}` |  `\"\"`   | A custom suffix will be added to each class name\n|**excludePattern**| `{RegExp}` | `null`  | A regular expression for removing characters\n\n\u003e [mini-css-class-name](https://github.com/shoonia/mini-css-class-name#readme)\n\n## License\n[MIT](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshoonia%2Fgatsby-plugin-mini-css-class-name","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshoonia%2Fgatsby-plugin-mini-css-class-name","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshoonia%2Fgatsby-plugin-mini-css-class-name/lists"}