Current section
Files
Jump to
Current section
Files
live_interaction_contracts
mix.exs
mix.exs
defmodule LiveInteractionContracts.MixProject do
use Mix.Project
@version "1.0.0"
@source_url "https://github.com/vendyluo/liveview-interaction-architecture"
def project do
[
app: :live_interaction_contracts,
version: @version,
# Extracts colocated hooks (the components' client JS) into
# _build/*/phoenix-colocated/live_interaction_contracts/ with an index.js manifest.
compilers: [:phoenix_live_view] ++ Mix.compilers(),
# Baselined on the author's toolchain (Elixir 1.20 / OTP 28). The compare task
# uses the built-in JSON module (1.18+). Not maintained for older versions.
elixir: "~> 1.18",
start_permanent: false,
deps: deps(),
description:
"Dev/test-only conformance harness that checks whether browser-native " <>
"interaction state (popover, dialog, focus, scroll, combobox listbox) is " <>
"patch-safe under Phoenix LiveView. Not a UI component library.",
package: package(),
docs: [main: "readme", extras: ["README.md", "SPEC.md", "KERNEL.md"]],
source_url: @source_url
]
end
def application, do: [extra_applications: [:logger]]
# The conformance tasks orchestrate external `elixir` (Mix.install fixtures) +
# `node` (Playwright) and need no deps. The shipped reference components
# (lib/.../components) use Phoenix.Component, so phoenix_live_view is required to
# compile them — a consumer already has it. Optional so a harness-only,
# dev/test-only install can still skip it if the components are unused.
# ~> 1.1 because the components ship their client JS as colocated hooks
# (Phoenix.LiveView.ColocatedHook, LiveView 1.1+ / Phoenix 1.8+).
defp deps do
[
{:phoenix_live_view, "~> 1.1", optional: true},
{:ex_doc, "~> 0.34", only: :dev, runtime: false}
]
end
defp package do
[
licenses: ["MIT"],
links: %{"GitHub" => @source_url},
# priv is enumerated by explicit globs (not the whole dir): fixture runs leave
# server.log / _build / node_modules / versions.json on disk, and hex packs
# whatever matches — a bare `priv` ships that junk into the package.
files: ~w(lib priv/*/app.exs priv/*/*.mjs priv/*/*results*.json
mix.exs package.json README.md SPEC.md KERNEL.md
DELEGATION_LEDGER.md CONFORMANCE.md CURSOR_CONTRACT.md
CHANNEL_CONTRACT.md REFERENCE_POPOVER_CONTRACT.md
CONTRACT_DIALOG.md CONTRACT_MENU.md CONTRACT_TOOLTIP.md
CONTRACT_SELECT.md CONTRACT_COMBOBOX.md CONTRACT_ISLAND.md BUILDING_COMPONENTS.md
RED_FIXTURES.md BACKLOG.md REPRODUCE.md)
]
end
end