{"id":18440242,"url":"https://github.com/drowzy/phx_svg","last_synced_at":"2025-09-02T04:38:55.942Z","repository":{"id":63242536,"uuid":"564760535","full_name":"drowzy/phx_svg","owner":"drowzy","description":"Precompile svg","archived":false,"fork":false,"pushed_at":"2022-11-15T15:27:56.000Z","size":15,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-19T05:26:13.976Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","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/drowzy.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}},"created_at":"2022-11-11T12:41:11.000Z","updated_at":"2023-04-19T02:44:06.000Z","dependencies_parsed_at":"2022-11-15T15:45:30.675Z","dependency_job_id":null,"html_url":"https://github.com/drowzy/phx_svg","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/drowzy/phx_svg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drowzy%2Fphx_svg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drowzy%2Fphx_svg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drowzy%2Fphx_svg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drowzy%2Fphx_svg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drowzy","download_url":"https://codeload.github.com/drowzy/phx_svg/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drowzy%2Fphx_svg/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273233245,"owners_count":25068725,"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","status":"online","status_checked_at":"2025-09-02T02:00:09.530Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-11-06T06:29:11.650Z","updated_at":"2025-09-02T04:38:55.897Z","avatar_url":"https://github.com/drowzy.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Phx.Svg\n\n[![Hex.pm Version](https://img.shields.io/hexpm/v/postgrex_pgoutput.svg?style=flat-square)](https://hex.pm/packages/phx_svg)\n\nPrecompile SVGS to functions. Packaged as a `Phoenix Component`\n\n## Options\n\n* `svg_path` - Wildcard path to svgs ex `./path/to/**/.svg`\n* `mod_name` - Module name to use for generated files defaults to: `SVG`\n* `output_path` - Output path defautl: `lib/icons.ex`\n\n## Usage\n\n```sh\nmix phx_svg.build \\\n--mod-name=MySvgs \\ \n--svg-path=\"path/to/svgs/**/*.svg\" \\\n--output-path=\"./lib/my_app_web/components/svgs.ex\"\n```\n\nIn a `HEEX` template:\n\n```elixir\ndef render(assigns) do\n  ~H\"\"\"\n  \u003cdiv\u003e\n    \u003cSvgs.name_of_svg /\u003e\n    \u003cSvgs.name_of_svg class=\"w-2 h-2\" /\u003e\n  \u003c/div\u003e\n  \"\"\"\nend\n```\n\n## Installation\n\nThe package can be installed by adding `phx_svg` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:phx_svg, \"~\u003e 0.1.0\", only: [:dev], runtime: false}\n  ]\nend\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrowzy%2Fphx_svg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrowzy%2Fphx_svg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrowzy%2Fphx_svg/lists"}