Return to generating the icons from the filesystem

This commit is contained in:
Max Veytsman
2022-09-01 16:37:50 -04:00
parent b5200596c4
commit 0fef953625
9 changed files with 95 additions and 37363 deletions

View File

@ -0,0 +1,12 @@
defmodule Heroicons.IconCache do
@doc "Get's an icon's body from the filesystem"
# TODO implement ETS-based caching & benchmark
def icon_body(path) do
icon = File.read!(path)
<<"<svg ", body::binary>> = icon
body
end
end