{"id":15684620,"url":"https://github.com/byroot/sprockets-svg","last_synced_at":"2025-05-06T21:07:40.706Z","repository":{"id":59156163,"uuid":"18709014","full_name":"byroot/sprockets-svg","owner":"byroot","description":"SVG toolchain for sprockets","archived":false,"fork":false,"pushed_at":"2020-12-11T09:30:46.000Z","size":111,"stargazers_count":10,"open_issues_count":3,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-06T21:07:31.345Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/byroot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-04-12T16:44:34.000Z","updated_at":"2021-12-15T20:06:57.000Z","dependencies_parsed_at":"2022-09-13T20:10:51.887Z","dependency_job_id":null,"html_url":"https://github.com/byroot/sprockets-svg","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byroot%2Fsprockets-svg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byroot%2Fsprockets-svg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byroot%2Fsprockets-svg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byroot%2Fsprockets-svg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/byroot","download_url":"https://codeload.github.com/byroot/sprockets-svg/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252769420,"owners_count":21801378,"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":[],"created_at":"2024-10-03T17:20:14.443Z","updated_at":"2025-05-06T21:07:40.684Z","avatar_url":"https://github.com/byroot.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/byroot/sprockets-svg.svg)](https://travis-ci.org/byroot/sprockets-svg)\n[![Code Climate](https://codeclimate.com/github/byroot/sprockets-svg.png)](https://codeclimate.com/github/byroot/sprockets-svg)\n[![Gem Version](https://badge.fury.io/rb/sprockets-svg.png)](http://badge.fury.io/rb/sprockets-svg)\n\n# Sprockets::Svg\n\nSVG toolchain for sprockets\n\n## Installation\n\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install sprockets-svg\n\n## Usage\n\n### Ruby on Rails\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'sprockets-svg'\n```\n\nFrom now on, svg files will be automatically optimised.\n\nTo link the png version of `picture.svg` from scss:\n\n```scss\n#id {\n  background-image: image-url(picture.svg.png)\n}\n```\n\nor from a view:\n\n```erb\n\u003c%= image_tag 'picture.svg.png' %\u003e\n```\n\n### Standalone Sprockets\n\nIf you are using sprockets outside of Rails, to setup `sprockets-svg` you just need:\n\n```ruby\nassets = Sprockets::Environment.new do |env|\n  # Your assets settings\nend\n\nrequire \"sprockets-svg\"\nSprockets::Svg.install(assets)\n```\n\n## Optimizations\n\nFor now the only optimization performed is to remove hidden elements.\n\nIn the future I'd like to rely on the [`svgo` toolchain](https://github.com/svg/svgo).\n\n## Contributing\n\n1. Fork it ( http://github.com/\u003cmy-github-username\u003e/sprockets-svg/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbyroot%2Fsprockets-svg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbyroot%2Fsprockets-svg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbyroot%2Fsprockets-svg/lists"}