mirror of
https://github.com/woutdp/live_svelte
synced 2026-05-24 09:28:21 +00:00
Upgrade to 0.1.0-rc3
This commit is contained in:
parent
7e1a7e930b
commit
089466bf66
7 changed files with 21 additions and 17 deletions
|
|
@ -46,7 +46,7 @@ Add `live_svelte` to your list of dependencies in `mix.exs`:
|
|||
```elixir
|
||||
def deps do
|
||||
[
|
||||
{:live_svelte, "~> 0.1.0-rc2"}
|
||||
{:live_svelte, "~> 0.1.0-rc3"}
|
||||
]
|
||||
end
|
||||
```
|
||||
|
|
@ -82,7 +82,7 @@ def render(assigns) do
|
|||
end
|
||||
```
|
||||
|
||||
If you component is in a directory, for example `assets/svelte/components/some-directory/SomeComponent.svelte` you need to include the directory in your name: `some-directory/SomeComponent`.
|
||||
If your component is in a directory, for example `assets/svelte/components/some-directory/SomeComponent.svelte` you need to include the directory in your name: `some-directory/SomeComponent`.
|
||||
|
||||
### Examples
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ defmodule LiveSvelte do
|
|||
|
||||
## Examples
|
||||
|
||||
LiveView
|
||||
### LiveView
|
||||
|
||||
defmodule App.SvelteLive do
|
||||
use App, :live_view
|
||||
|
|
@ -38,7 +38,7 @@ defmodule LiveSvelte do
|
|||
end
|
||||
end
|
||||
|
||||
Svelte Component
|
||||
### Svelte Component
|
||||
|
||||
<script>
|
||||
import {slide, fly} from 'svelte/transition'
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
defmodule Mix.Tasks.LiveSvelte.ConfigureEsbuild do
|
||||
import LiveSvelte.Logger
|
||||
|
||||
@doc """
|
||||
@moduledoc """
|
||||
Creates Javascript files to be used by esbuild. Necessary for LiveSvelte to work.
|
||||
"""
|
||||
|
||||
import LiveSvelte.Logger
|
||||
|
||||
def run(_) do
|
||||
log_info("-- Configuring esbuild...")
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,14 @@
|
|||
defmodule Mix.Tasks.LiveSvelte.ConfigurePhoenix do
|
||||
@moduledoc """
|
||||
Configures any necessary code changes inside Phoenix to make LiveSvelte work.
|
||||
"""
|
||||
|
||||
import LiveSvelte.Logger
|
||||
|
||||
@watcher_regex ~r/watchers:\s\[(?!\s+node:)/
|
||||
@esbuild_regex ~r/(?<!# )esbuild: {.*}/
|
||||
@nodejs_regex ~r/children\s+=\s+\[(?!\s+\{NodeJS)/
|
||||
|
||||
@doc """
|
||||
Configures any necessary code changes inside Phoenix to make LiveSvelte work.
|
||||
"""
|
||||
def run(_) do
|
||||
log_info("-- Configuring Phoenix...")
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
defmodule Mix.Tasks.LiveSvelte.InstallNpmDeps do
|
||||
import LiveSvelte.Logger
|
||||
|
||||
@doc """
|
||||
@moduledoc """
|
||||
Installs npm dependencies for LiveSvelte.
|
||||
"""
|
||||
|
||||
import LiveSvelte.Logger
|
||||
|
||||
def run(_) do
|
||||
log_info("-- Installing npm dependencies...")
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
defmodule Mix.Tasks.LiveSvelte.Setup do
|
||||
import LiveSvelte.Logger
|
||||
|
||||
@doc """
|
||||
@moduledoc """
|
||||
Runs all setup tasks for LiveSvelte.
|
||||
"""
|
||||
|
||||
import LiveSvelte.Logger
|
||||
|
||||
def run(_) do
|
||||
[
|
||||
"install_npm_deps",
|
||||
|
|
|
|||
2
mix.exs
2
mix.exs
|
|
@ -1,7 +1,7 @@
|
|||
defmodule LiveSvelte.MixProject do
|
||||
use Mix.Project
|
||||
|
||||
@version "0.1.0-rc2"
|
||||
@version "0.1.0-rc3"
|
||||
@repo_url "https://github.com/woutdp/live_svelte"
|
||||
|
||||
def project do
|
||||
|
|
|
|||
Loading…
Reference in a new issue