Current section

48 Versions

Jump to

Compare versions

7 files changed
+47 additions
-40 deletions
  @@ -1,5 +1,9 @@
1 1 # Changelog
2 2
3 + ## 0.1.15
4 +
5 + Removed Octicon builder template files from distribution.
6 +
3 7 ## 0.1.14
4 8
5 9 - Updated `octicons` dependency to `17.10.1`
  @@ -11,7 +11,6 @@
11 11 <<"lib/helpers/test_helpers.ex">>,<<"lib/helpers/component_helpers.ex">>,
12 12 <<"lib/ui_icons.ex">>,<<"lib/octicons.ex">>,<<".formatter.exs">>,
13 13 <<"mix.exs">>,<<"README.md">>,<<"LICENSE.md">>,
14 - <<"priv/octicon_builder/PrimerLive.Octicons.template.eex">>,
15 14 <<"priv/octicon_builder/build.exs">>,<<"CHANGELOG.md">>]}.
16 15 {<<"licenses">>,[<<"MIT">>]}.
17 16 {<<"links">>,
  @@ -38,4 +37,4 @@
38 37 {<<"optional">>,false},
39 38 {<<"repository">>,<<"hexpm">>},
40 39 {<<"requirement">>,<<"~> 1.0">>}]]}.
41 - {<<"version">>,<<"0.1.14">>}.
40 + {<<"version">>,<<"0.1.15">>}.
  @@ -9,17 +9,52 @@ defmodule PrimerLive.Helpers.OcticonsHelper do
9 9 @module_path "lib/octicons.ex"
10 10 @story_list_path "#{@priv_path}/story_list.ex"
11 11
12 - EEx.function_from_file(
12 + EEx.function_from_string(
13 13 :defp,
14 14 :module_wrapper,
15 - "#{@priv_path}/PrimerLive.Octicons.template.eex",
15 + """
16 + defmodule PrimerLive.Octicons do
17 + use Phoenix.Component
18 +
19 + # Generated by PrimerLive.Helpers.OcticonsHelper
20 +
21 + @doc \"\"\"
22 + Internal use: generates a map of SVG's.
23 +
24 + To use the `PrimerLive.Component.octicon/1` component, write:
25 + ```
26 + <.octicon name="icon-name" />
27 + ```
28 +
29 + ## All octicons
30 +
31 + ```
32 + <%= for %{name: name} <- icons do %><.octicon name="<%= name %>" />
33 + <% end %>```
34 + \"\"\"
35 +
36 + def octicons(assigns) do
37 + %{
38 + <%= for %{name: name, svg: svg} <- icons do %>
39 + "<%= name %>" => ~H\"\"\"
40 + <%= svg %>
41 + \"\"\",<% end %>
42 + }
43 + end
44 +
45 + end
46 + """,
16 47 [:icons]
17 48 )
18 49
19 - EEx.function_from_file(
50 + EEx.function_from_string(
20 51 :defp,
21 52 :story_list,
22 - "#{@priv_path}/PrimerLive.Octicons.story_list_template.eex",
53 + """
54 + stories = [
55 + <%= for %{name: name} <- icons do %>%{title: "<%= name %>", story_fn: &icon_story/1},
56 + <% end %>]
57 + """,
23 58 [:icons]
24 59 )
unknownlib/octicons.ex
File is too large to be displayed (100 KB limit).
  @@ -39,7 +39,7 @@ defmodule PrimerLive do
39 39 Add PrimerLive as a dependency in your Phoenix application's `mix.exs`
40 40
41 41 ```
42 - {:primer_live, "~> 0.1.14"}
42 + {:primer_live, "~> 0.1.15"}
43 43 ```
44 44
45 45 Run `mix.deps get`
Loading more files…