Current section
14 Versions
Jump to
Current section
14 Versions
Compare versions
4
files changed
+7
additions
-5
deletions
| @@ -21,11 +21,13 @@ A PoC for single-file components for [Phoenix](https://www.phoenixframework.org) | |
| 21 21 | ```elixir |
| 22 22 | def deps do |
| 23 23 | [ |
| 24 | - {:svx, "~> 0.3.0"} |
| 24 | + {:svx, "~> 0.3.1"} |
| 25 25 | ] |
| 26 26 | end |
| 27 27 | ``` |
| 28 28 | |
| 29 | + **Note**: Requires `fswatch` (`apt-get fswatch` or `brew install fswatch`) |
| 30 | + |
| 29 31 | 2. In `lib/<you_app>/application.ex` add Svx to apps that you start: |
| 30 32 | |
| 31 33 | ``` |
| @@ -190,4 +192,4 @@ I had something similar for LiveView: | |
| 190 192 | - Styling code isn't in a separate file in an entirely different directory |
| 191 193 | |
| 192 194 | IMO the sweet spot for single-file components is a medium-to-large template with not too-much |
| 193 | - elixir code powering it. |
| \ No newline at end of file | |
| 195 | + elixir code powering it. |
| @@ -30,4 +30,4 @@ | |
| 30 30 | {<<"optional">>,false}, |
| 31 31 | {<<"repository">>,<<"hexpm">>}, |
| 32 32 | {<<"requirement">>,<<"~> 1.0">>}]]}. |
| 33 | - {<<"version">>,<<"0.3.1">>}. |
| 33 | + {<<"version">>,<<"0.3.2">>}. |
| @@ -117,8 +117,8 @@ defmodule Svx.Compiler do | |
| 117 117 | def compile_all(path, state) do |
| 118 118 | Logger.info("Recompiling all files in #{path}") |
| 119 119 | compiled = ls_r(path) |
| 120 | - |> Enum.chunk_every(4) |
| 121 120 | |> Enum.filter(fn file -> Path.extname(file) in @extensions end) |
| 121 | + |> Enum.chunk_every(4) |
| 122 122 | |> Enum.map( |
| 123 123 | &Task.async(fn -> compile_many(&1, state) end) |
| 124 124 | ) |
| @@ -5,7 +5,7 @@ defmodule Svx.MixProject do | |
| 5 5 | [ |
| 6 6 | app: :svx, |
| 7 7 | name: "Svx", |
| 8 | - version: "0.3.1", |
| 8 | + version: "0.3.2", |
| 9 9 | description: "A PoC for single-file components for Phoenix LiveView", |
| 10 10 | elixir: "~> 1.12", |
| 11 11 | start_permanent: Mix.env() == :prod, |