{"id":13496572,"url":"https://github.com/benboba/svg-slim","last_synced_at":"2025-03-28T19:30:38.192Z","repository":{"id":42438343,"uuid":"144266013","full_name":"benboba/svg-slim","owner":"benboba","description":"A cool svg optimization tool that supports the svg standard","archived":false,"fork":false,"pushed_at":"2022-04-07T03:17:02.000Z","size":8552,"stargazers_count":75,"open_issues_count":2,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-18T07:06:54.209Z","etag":null,"topics":["compress","minify","optimization","svg","svg-optimization"],"latest_commit_sha":null,"homepage":"https://benboba.github.io/svg-slim-web","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/benboba.png","metadata":{"files":{"readme":"README-cn.md","changelog":"CHANGELOG-cn.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-10T09:25:18.000Z","updated_at":"2024-08-13T03:59:21.000Z","dependencies_parsed_at":"2022-08-25T10:50:23.756Z","dependency_job_id":null,"html_url":"https://github.com/benboba/svg-slim","commit_stats":null,"previous_names":["benboba/svg-slimming"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benboba%2Fsvg-slim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benboba%2Fsvg-slim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benboba%2Fsvg-slim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benboba%2Fsvg-slim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benboba","download_url":"https://codeload.github.com/benboba/svg-slim/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246088320,"owners_count":20721661,"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":["compress","minify","optimization","svg","svg-optimization"],"created_at":"2024-07-31T19:01:51.932Z","updated_at":"2025-03-28T19:30:37.557Z","avatar_url":"https://github.com/benboba.png","language":"TypeScript","funding_links":["https://www.paypal.com/paypalme/benboba"],"categories":["TypeScript"],"sub_categories":[],"readme":"# SVG瘦身工具【svg slim】\n\n[![npm version](https://badge.fury.io/js/svg-slim.svg)](https://badge.fury.io/js/svg-slim)\n\n## 更新日志\n\n[查看更新日志](./CHANGELOG-cn.md)\n\n## 简介\n\nSVG瘦身工具是一款提供了丰富自定义功能的 SVG 压缩工具，遵循 W3C 的 [SVG 规范](https://www.w3.org/TR/SVG/) \n\n## 安装\n```\nnpm install svg-slim\n```\n\n或者\n\n```\nyarn add svg-slim\n```\n\n## 使用\n```js\nimport svgSlim from 'svg-slim';\nsvgSlim(svgcode[, config]).then(result =\u003e {\n\tconsole.log(result);\n});\n```\n\n其中 svgcode 为字符串格式的 svg 文本，config 为用户自定义的[优化配置](docs/cn/config.md)\n\n### 优化配置\n\n查看主条目[优化配置](docs/cn/config.md)\n\n### 在线使用\n\n[svg-slim-web](https://benboba.github.io/svg-slim-web/)\n\n### 使用 svg-slim-loader\n\n[svg-slim-loader](https://github.com/benboba/svg-slim-loader) 是 webpack 的 loader 插件，支持对 import 的 SVG 文件进行优化\n\n### 使用 postcss-svg-slim\n\n[postcss-svg-slim](https://github.com/benboba/postcss-svg-slim) 是 postcss 的插件，支持优化 CSS 中内联的 SVG\n\n### 使用 rollup-plugin-svg-slim\n\n[rollup-plugin-svg-slim](https://github.com/benboba/rollup-plugin-svg-slim) 是 rollup 的插件，支持在 rollup 中优化 SVG\n\n## 为什么选择 svg-slim？\n\n* 丰富而强大的功能，足够个性化的配置参数\n* 追求极致的优化效果\n* 尽可能不破坏原有的 svg 效果\n* 遵循最新的 svg 规范\n\n# 捐助项目\n\n如果你觉得这个项目对你有帮助，欢迎提供赞助。\n\n[\u003cimg src=\"docs/assets/paypal.png\" width=\"420\"\u003e](https://www.paypal.com/paypalme/benboba)\n\u003cp\u003e\u003cimg src=\"docs/assets/alipay.png\" width=\"420\"\u003e\u003c/p\u003e\n\u003cp\u003e\u003cimg src=\"docs/assets/wechat.png\" width=\"420\"\u003e\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenboba%2Fsvg-slim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenboba%2Fsvg-slim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenboba%2Fsvg-slim/lists"}