Packages
phoenix_live_view
1.1.20
1.2.7
1.2.6
1.2.5
1.2.4
1.2.3
1.2.2
1.2.1
1.2.0
1.2.0-rc.3
1.2.0-rc.2
1.2.0-rc.1
1.2.0-rc.0
1.1.32
1.1.31
1.1.30
1.1.29
1.1.28
1.1.27
1.1.26
1.1.25
1.1.24
1.1.23
1.1.22
1.1.21
1.1.20
1.1.19
1.1.18
1.1.17
1.1.16
1.1.15
1.1.14
1.1.13
1.1.12
1.1.11
1.1.10
1.1.9
1.1.8
1.1.7
1.1.6
retired
1.1.5
1.1.4
1.1.3
1.1.2
1.1.1
1.1.0
1.1.0-rc.4
1.1.0-rc.3
1.1.0-rc.2
1.1.0-rc.1
1.1.0-rc.0
1.0.18
1.0.17
1.0.16
1.0.15
1.0.14
1.0.13
1.0.12
1.0.11
1.0.10
1.0.9
1.0.8
retired
1.0.7
1.0.6
retired
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
1.0.0-rc.9
1.0.0-rc.8
1.0.0-rc.7
1.0.0-rc.6
1.0.0-rc.5
1.0.0-rc.4
1.0.0-rc.3
1.0.0-rc.2
1.0.0-rc.1
1.0.0-rc.0
0.20.17
0.20.16
0.20.15
0.20.14
0.20.13
0.20.12
0.20.11
0.20.10
0.20.9
0.20.8
0.20.7
0.20.6
0.20.5
0.20.4
0.20.3
0.20.2
0.20.1
0.20.0
0.19.5
0.19.4
0.19.3
0.19.2
0.19.1
0.19.0
0.18.18
0.18.17
0.18.16
0.18.15
0.18.14
0.18.13
0.18.12
0.18.11
0.18.10
0.18.9
0.18.8
0.18.7
0.18.6
0.18.5
0.18.4
0.18.3
0.18.2
0.18.1
0.18.0
0.17.14
0.17.13
0.17.12
0.17.11
0.17.10
0.17.9
0.17.8
0.17.7
0.17.6
0.17.5
0.17.4
0.17.3
0.17.2
0.17.1
0.17.0
0.16.4
0.16.3
0.16.2
0.16.1
0.16.0
0.15.7
0.15.6
0.15.5
0.15.4
0.15.3
0.15.2
0.15.1
0.15.0
0.14.8
0.14.7
0.14.6
0.14.5
0.14.4
0.14.3
0.14.2
0.14.1
0.14.0
0.13.3
0.13.2
0.13.1
0.13.0
0.12.1
0.12.0
0.11.1
0.11.0
0.10.0
0.9.0
0.8.1
0.8.0
0.7.1
0.7.0
0.6.0
0.6.0-dev
0.5.2
0.5.1
0.5.0
0.4.1
0.4.0
0.3.1
0.3.0
0.2.1
0.2.0
0.1.1
0.1.0
Rich, real-time user experiences with server-rendered HTML
Current section
Files
Jump to
Current section
Files
phoenix_live_view
mix.exs
mix.exs
defmodule Phoenix.LiveView.MixProject do
use Mix.Project
@version "1.1.20"
def project do
[
app: :phoenix_live_view,
version: @version,
elixir: "~> 1.15",
start_permanent: Mix.env() == :prod,
elixirc_paths: elixirc_paths(Mix.env()),
test_options: [docs: true],
test_coverage: [summary: [threshold: 85], ignore_modules: coverage_ignore_modules()],
xref: [exclude: [LazyHTML, LazyHTML.Tree]],
package: package(),
deps: deps(),
aliases: aliases(),
docs: &docs/0,
name: "Phoenix LiveView",
homepage_url: "http://www.phoenixframework.org",
description: """
Rich, real-time user experiences with server-rendered HTML
""",
listeners: [Phoenix.CodeReloader],
# ignore misnamed test file warnings for e2e support files
test_ignore_filters: [&String.starts_with?(&1, "test/e2e/support")]
]
end
def cli do
[preferred_envs: [docs: :docs]]
end
defp elixirc_paths(:e2e), do: ["lib", "test/support", "test/e2e/support"]
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
def application do
[
mod: {Phoenix.LiveView.Application, []},
extra_applications: [:logger]
]
end
defp deps do
[
{:igniter, "~> 0.6 and >= 0.6.16", optional: true},
{:phoenix, "~> 1.6.15 or ~> 1.7.0 or ~> 1.8.0-rc"},
{:plug, "~> 1.15"},
{:phoenix_template, "~> 1.0"},
{:phoenix_html, "~> 3.3 or ~> 4.0 or ~> 4.1"},
{:telemetry, "~> 0.4.2 or ~> 1.0"},
{:esbuild, "~> 0.2", only: :dev},
{:phoenix_view, "~> 2.0", optional: true},
{:jason, "~> 1.0", optional: true},
{:lazy_html, "~> 0.1.0", optional: true},
{:ex_doc, "~> 0.29", only: :docs},
{:makeup_elixir, "~> 1.0.1 or ~> 1.1", only: [:docs, :e2e]},
{:makeup_eex, "~> 2.0", only: [:docs, :e2e]},
{:makeup_syntect, "~> 0.1.0", only: [:docs, :e2e]},
{:html_entities, ">= 0.0.0", only: :test},
{:phoenix_live_reload, "~> 1.4", only: :test},
{:phoenix_html_helpers, "~> 1.0", only: :test},
{:bandit, "~> 1.5", only: :e2e},
{:ecto, "~> 3.11", only: :e2e},
{:phoenix_ecto, "~> 4.5", only: :e2e}
]
end
defp docs do
[
main: "welcome",
source_ref: "v#{@version}",
source_url: "https://github.com/phoenixframework/phoenix_live_view",
extra_section: "GUIDES",
extras: extras(),
groups_for_extras: groups_for_extras(),
groups_for_modules: groups_for_modules(),
groups_for_docs: [
Components: &(&1[:type] == :component),
Macros: &(&1[:type] == :macro)
],
skip_undefined_reference_warnings_on: ["CHANGELOG.md"],
before_closing_body_tag: &before_closing_body_tag/1
]
end
defp before_closing_body_tag(:html) do
"""
<script defer src="https://cdn.jsdelivr.net/npm/mermaid@11.6.0/dist/mermaid.min.js"></script>
<script>
let initialized = false;
window.addEventListener("exdoc:loaded", () => {
if (!initialized) {
mermaid.initialize({
startOnLoad: false,
theme: document.body.className.includes("dark") ? "dark" : "default"
});
initialized = true;
}
let id = 0;
for (const codeEl of document.querySelectorAll("pre code.mermaid")) {
const graphDefinition = codeEl.textContent;
const graphId = "mermaid-graph-" + id++;
mermaid.render(graphId, graphDefinition).then(({svg, bindFunctions}) => {
codeEl.innerHTML = svg;
bindFunctions?.(codeEl);
});
}
});
</script>
"""
end
defp before_closing_body_tag(_), do: ""
defp extras do
["CHANGELOG.md"] ++
Path.wildcard("guides/*/*.md") ++
Path.wildcard("guides/cheatsheets/*.cheatmd")
end
defp groups_for_extras do
[
Introduction: ~r"guides/introduction/",
"Server-side features": ~r"guides/server/",
"Client-side integration": ~r"guides/client/",
Cheatsheets: ~r"guides/cheatsheets/"
]
end
defp groups_for_modules do
# Ungrouped Modules:
#
# Phoenix.Component
# Phoenix.LiveComponent
# Phoenix.LiveView
# Phoenix.LiveView.Controller
# Phoenix.LiveView.JS
# Phoenix.LiveView.Router
# Phoenix.LiveViewTest
[
Configuration: [
Phoenix.LiveView.HTMLFormatter,
Phoenix.LiveView.Logger,
Phoenix.LiveView.Socket
],
"Testing structures": [
Phoenix.LiveViewTest.Element,
Phoenix.LiveViewTest.Upload,
Phoenix.LiveViewTest.View
],
"Upload structures": [
Phoenix.LiveView.UploadConfig,
Phoenix.LiveView.UploadEntry,
Phoenix.LiveView.UploadWriter
],
"Plugin API": [
Phoenix.LiveComponent.CID,
Phoenix.LiveView.Engine,
Phoenix.LiveView.TagEngine,
Phoenix.LiveView.HTMLEngine,
Phoenix.LiveView.Component,
Phoenix.LiveView.Rendered,
Phoenix.LiveView.Comprehension
]
]
end
defp package do
[
maintainers: ["Chris McCord", "José Valim", "Gary Rennie", "Alex Garibay", "Scott Newcomer"],
licenses: ["MIT"],
links: %{
Changelog: "https://hexdocs.pm/phoenix_live_view/changelog.html",
GitHub: "https://github.com/phoenixframework/phoenix_live_view"
},
files:
~w(assets/js lib priv) ++
~w(CHANGELOG.md LICENSE.md mix.exs package.json README.md .formatter.exs)
]
end
defp aliases do
[
"assets.build": [
"cmd npm run build",
"esbuild module",
"esbuild cdn",
"esbuild cdn_min",
"esbuild main"
],
"assets.watch": ["cmd npm run build -- --watch", "esbuild module --watch"]
]
end
defp coverage_ignore_modules do
[
~r/Phoenix\.LiveViewTest\.Support\..*/,
~r/Phoenix\.LiveViewTest\.E2E\..*/,
~r/Inspect\..*/
]
end
end