{"id":16701116,"url":"https://github.com/scriptex/svgo-viewbox","last_synced_at":"2025-03-21T19:33:11.651Z","repository":{"id":42655502,"uuid":"307385706","full_name":"scriptex/svgo-viewbox","owner":"scriptex","description":"Add viewBox attribute to your SVGs and then optimize them with SVGO","archived":false,"fork":false,"pushed_at":"2024-04-22T10:13:10.000Z","size":307,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-02T06:13:52.164Z","etag":null,"topics":["svg-images","svg-optimizer","svgo","viewbox"],"latest_commit_sha":null,"homepage":"https://atanas.info/portfolio/open-source/svgo-viewbox","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/scriptex.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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":{"github":["scriptex"],"patreon":"atanas","open_collective":null,"ko_fi":"scriptex","tidelift":null,"community_bridge":null,"liberapay":"scriptex","issuehunt":"scriptex","otechie":null,"custom":["paypal.me/scriptex","revolut.me/scriptex"]}},"created_at":"2020-10-26T13:42:24.000Z","updated_at":"2024-05-08T04:23:28.321Z","dependencies_parsed_at":"2023-10-12T08:09:56.655Z","dependency_job_id":"1171ed6e-a2c6-4a7f-89e2-42b2d178fdd7","html_url":"https://github.com/scriptex/svgo-viewbox","commit_stats":{"total_commits":63,"total_committers":4,"mean_commits":15.75,"dds":0.5396825396825398,"last_synced_commit":"b0f67ee2c1253a5f8060d65004f249c57fb71724"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":"scriptex/initial-commit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scriptex%2Fsvgo-viewbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scriptex%2Fsvgo-viewbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scriptex%2Fsvgo-viewbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scriptex%2Fsvgo-viewbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scriptex","download_url":"https://codeload.github.com/scriptex/svgo-viewbox/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244855711,"owners_count":20521690,"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":["svg-images","svg-optimizer","svgo","viewbox"],"created_at":"2024-10-12T18:28:49.026Z","updated_at":"2025-03-21T19:33:11.360Z","avatar_url":"https://github.com/scriptex.png","language":"JavaScript","readme":"[![GitHub release](https://img.shields.io/github/release/scriptex/svgo-viewbox.svg)](https://github.com/scriptex/svgo-viewbox/releases/latest)\n[![GitHub issues](https://img.shields.io/github/issues/scriptex/svgo-viewbox.svg)](https://github.com/scriptex/svgo-viewbox/issues)\n[![GitHub last commit](https://img.shields.io/github/last-commit/scriptex/svgo-viewbox.svg)](https://github.com/scriptex/svgo-viewbox/commits/master)\n[![Build Status](https://travis-ci.com/scriptex/svgo-viewbox.svg?branch=master)](https://travis-ci.com/scriptex/svgo-viewbox)\n[![npm](https://img.shields.io/npm/dt/svgo-viewbox.svg)](https://www.npmjs.com/package/svgo-viewbox)\n[![npm](https://img.shields.io/npm/v/svgo-viewbox.svg)](https://www.npmjs.com/package/svgo-viewbox)\n[![Analytics](https://ga-beacon-361907.ew.r.appspot.com/UA-83446952-1/github.com/scriptex/svgo-viewbox/README.md)](https://github.com/scriptex/svgo-viewbox/)\n\n# svgo-viewBox\n\n\u003e Add `viewBox` to SVG files using SVGO\n\nNode JS script which uses SVGO and a custom plugin in order to add `viewBox` attribute to all SVG files in a folder or to a single SVG file.\n\n## Dependencies\n\n1. NodeJS\n2. NPM or Yarn\n3. SVGO installed and configured - you should have a `svgo.config.js` file. If you don't, the default config file will be used.\n4. Some SVG files which have `width` and `height` attribute but lack the `viewBox` attribute.\n\n## Usage\n\n```sh\nsvgo-viewbox --help\n\n#   Usage\n#       $ svgo-viewbox --arg1 --arg2\n#\n#   Options\n#       --input, -i         path to folder which contains SVG files or a single svg file, defaults to current working directory\n#       --svgo-file, -f     path to SVGO configuration file in JS format (https://github.com/svg/svgo#configuration), defaults to the built-in SVGO configuration\n#\n#   Examples\n#       $ svgo-viewbox --input ./assets/images/svg --svgo-file ./svgo.config.js\n#       $ svgo-viewbox -i ./assets/images/svg\n#       $ svgo-viewbox -i ./assets/images/svg/file.svg\n#       $ svgo-viewbox\n```\n\n### As an NPM script\n\nFirst install the module as a development dependency\n\n```sh\nnpm i svgo-viewbox --save-dev\n\n# or\n\nyarn add svgo-viewbox -D\n```\n\nthen add a new NPM script in your `package.json` file:\n\n```json\n{\n\t\"scripts\": {\n\t\t\"svgo-viewbox\": \"svgo-viewbox -i ./assets/images/svg -f ./svgo.config.js\"\n\t}\n}\n```\n\n### From the command line\n\nFirst install the module globally\n\n```sh\nnpm i -g svgo-viewbox\n\n# or\n\nyarn global add svgo-viewbox\n```\n\nthen use it in your terminal\n\n```sh\nsvgo-viewbox -i ./assets/images/svg -f ./svgo.config.js\n```\n\n### Without installing\n\n```sh\nnpx svgo-viewbox -i ./assets/images/svg -f ./svgo.config.js\n```\n\n## LICENSE\n\nMIT\n\n---\n\n\u003cdiv align=\"center\"\u003e\n    Connect with me:\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\n\u003cdiv align=\"center\"\u003e\n    \u003ca href=\"https://atanas.info\"\u003e\n        \u003cimg src=\"https://raw.githubusercontent.com/scriptex/socials/master/styled-assets/logo.svg\" height=\"20\" alt=\"\"\u003e\n    \u003c/a\u003e\n    \u0026nbsp;\n    \u003ca href=\"mailto:hi@atanas.info\"\u003e\n        \u003cimg src=\"https://raw.githubusercontent.com/scriptex/socials/master/styled-assets/email.svg\" height=\"20\" alt=\"\"\u003e\n    \u003c/a\u003e\n    \u0026nbsp;\n    \u003ca href=\"https://www.linkedin.com/in/scriptex/\"\u003e\n        \u003cimg src=\"https://raw.githubusercontent.com/scriptex/socials/master/styled-assets/linkedin.svg\" height=\"20\" alt=\"\"\u003e\n    \u003c/a\u003e\n    \u0026nbsp;\n    \u003ca href=\"https://github.com/scriptex\"\u003e\n        \u003cimg src=\"https://raw.githubusercontent.com/scriptex/socials/master/styled-assets/github.svg\" height=\"20\" alt=\"\"\u003e\n    \u003c/a\u003e\n    \u0026nbsp;\n    \u003ca href=\"https://gitlab.com/scriptex\"\u003e\n        \u003cimg src=\"https://raw.githubusercontent.com/scriptex/socials/master/styled-assets/gitlab.svg\" height=\"20\" alt=\"\"\u003e\n    \u003c/a\u003e\n    \u0026nbsp;\n    \u003ca href=\"https://twitter.com/scriptexbg\"\u003e\n        \u003cimg src=\"https://raw.githubusercontent.com/scriptex/socials/master/styled-assets/twitter.svg\" height=\"20\" alt=\"\"\u003e\n    \u003c/a\u003e\n    \u0026nbsp;\n    \u003ca href=\"https://www.npmjs.com/~scriptex\"\u003e\n        \u003cimg src=\"https://raw.githubusercontent.com/scriptex/socials/master/styled-assets/npm.svg\" height=\"20\" alt=\"\"\u003e\n    \u003c/a\u003e\n    \u0026nbsp;\n    \u003ca href=\"https://www.youtube.com/user/scriptex\"\u003e\n        \u003cimg src=\"https://raw.githubusercontent.com/scriptex/socials/master/styled-assets/youtube.svg\" height=\"20\" alt=\"\"\u003e\n    \u003c/a\u003e\n    \u0026nbsp;\n    \u003ca href=\"https://stackoverflow.com/users/4140082/atanas-atanasov\"\u003e\n        \u003cimg src=\"https://raw.githubusercontent.com/scriptex/socials/master/styled-assets/stackoverflow.svg\" height=\"20\" alt=\"\"\u003e\n    \u003c/a\u003e\n    \u0026nbsp;\n    \u003ca href=\"https://codepen.io/scriptex/\"\u003e\n        \u003cimg src=\"https://raw.githubusercontent.com/scriptex/socials/master/styled-assets/codepen.svg\" width=\"20\" alt=\"\"\u003e\n    \u003c/a\u003e\n    \u0026nbsp;\n    \u003ca href=\"https://profile.codersrank.io/user/scriptex\"\u003e\n        \u003cimg src=\"https://raw.githubusercontent.com/scriptex/socials/master/styled-assets/codersrank.svg\" height=\"20\" alt=\"\"\u003e\n    \u003c/a\u003e\n    \u0026nbsp;\n    \u003ca href=\"https://linktr.ee/scriptex\"\u003e\n        \u003cimg src=\"https://raw.githubusercontent.com/scriptex/socials/master/styled-assets/linktree.svg\" height=\"20\" alt=\"\"\u003e\n    \u003c/a\u003e\n\u003c/div\u003e\n\n---\n\n\u003cdiv align=\"center\"\u003e\nSupport and sponsor my work:\n\u003cbr /\u003e\n\u003cbr /\u003e\n\u003ca href=\"https://twitter.com/intent/tweet?text=Checkout%20this%20awesome%20developer%20profile%3A\u0026url=https%3A%2F%2Fgithub.com%2Fscriptex\u0026via=scriptexbg\u0026hashtags=software%2Cgithub%2Ccode%2Cawesome\" title=\"Tweet\"\u003e\n\t\u003cimg src=\"https://img.shields.io/badge/Tweet-Share_my_profile-blue.svg?logo=twitter\u0026color=38A1F3\" /\u003e\n\u003c/a\u003e\n\u003ca href=\"https://paypal.me/scriptex\" title=\"Donate on Paypal\"\u003e\n\t\u003cimg src=\"https://img.shields.io/badge/Donate-Support_me_on_PayPal-blue.svg?logo=paypal\u0026color=222d65\" /\u003e\n\u003c/a\u003e\n\u003ca href=\"https://revolut.me/scriptex\" title=\"Donate on Revolut\"\u003e\n\t\u003cimg src=\"https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/scriptex/scriptex/master/badges/revolut.json\" /\u003e\n\u003c/a\u003e\n\u003ca href=\"https://patreon.com/atanas\" title=\"Become a Patron\"\u003e\n\t\u003cimg src=\"https://img.shields.io/badge/Become_Patron-Support_me_on_Patreon-blue.svg?logo=patreon\u0026color=e64413\" /\u003e\n\u003c/a\u003e\n\u003ca href=\"https://ko-fi.com/scriptex\" title=\"Buy Me A Coffee\"\u003e\n\t\u003cimg src=\"https://img.shields.io/badge/Donate-Buy%20me%20a%20coffee-yellow.svg?logo=ko-fi\" /\u003e\n\u003c/a\u003e\n\u003ca href=\"https://liberapay.com/scriptex/donate\" title=\"Donate on Liberapay\"\u003e\n\t\u003cimg src=\"https://img.shields.io/liberapay/receives/scriptex?label=Donate%20on%20Liberapay\u0026logo=liberapay\" /\u003e\n\u003c/a\u003e\n\n\u003ca href=\"https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/scriptex/scriptex/master/badges/bitcoin.json\" title=\"Donate Bitcoin\"\u003e\n\t\u003cimg src=\"https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/scriptex/scriptex/master/badges/bitcoin.json\" /\u003e\n\u003c/a\u003e\n\u003ca href=\"https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/scriptex/scriptex/master/badges/etherium.json\" title=\"Donate Etherium\"\u003e\n\t\u003cimg src=\"https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/scriptex/scriptex/master/badges/etherium.json\" /\u003e\n\u003c/a\u003e\n\u003ca href=\"https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/scriptex/scriptex/master/badges/shiba-inu.json\" title=\"Donate Shiba Inu\"\u003e\n\t\u003cimg src=\"https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/scriptex/scriptex/master/badges/shiba-inu.json\" /\u003e\n\u003c/a\u003e\n\u003c/div\u003e\n","funding_links":["https://github.com/sponsors/scriptex","https://patreon.com/atanas","https://ko-fi.com/scriptex","https://liberapay.com/scriptex","https://issuehunt.io/r/scriptex","paypal.me/scriptex","revolut.me/scriptex","https://paypal.me/scriptex","https://liberapay.com/scriptex/donate"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscriptex%2Fsvgo-viewbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscriptex%2Fsvgo-viewbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscriptex%2Fsvgo-viewbox/lists"}