This repository has been archived on 2023-08-07. You can view files and clone it, but cannot push or open issues or pull requests.
temple/mix.exs
Mitchell Hanberg 265c413960 Allow element attrs to be evaluated at runtime
Before this change, only keyword list literals could be passed to
elements. If they had non-literals as values, then those would compile
to EEx expressions.

This allows a non-literal to be passed as attrs and have the entire thing
compile to an EEx expression, which will pass the non-literal to a
"runtime_attrs" function, which evaluates a keyword list into a safe
string.

That last part might need to be reworked if the user is not using
the Phoenix.HTML.Engine EEx Engine.
2020-08-09 10:07:27 -04:00

54 lines
1.3 KiB
Elixir

defmodule Temple.MixProject do
use Mix.Project
def project do
[
app: :temple,
name: "Temple",
description: "An HTML DSL for Elixir and Phoenix",
version: "0.6.0-alpha.4",
package: package(),
elixirc_paths: elixirc_paths(Mix.env()),
elixir: "~> 1.7",
start_permanent: Mix.env() == :prod,
deps: deps(),
source_url: "https://github.com/mhanberg/temple",
docs: [
main: "Temple",
extras: ["README.md"],
deps: [
phoenix_html: "https://hexdocs.pm/phoenix_html/"
]
]
]
end
# Specifies which paths to compile per environment.
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger]
]
end
defp package do
[
maintainers: ["Mitchell Hanberg"],
licenses: ["MIT"],
links: %{github: "https://github.com/mhanberg/temple"},
exclude_patterns: ["temple.update_mdn_docs.ex"],
files: ~w(lib priv CHANGELOG.md LICENSE mix.exs README.md .formatter.exs)
]
end
defp deps do
[
{:ex_doc, "~> 0.22.0", only: :dev, runtime: false},
{:phoenix, ">= 0.0.0", optional: true},
{:phoenix_html, ">= 0.0.0", only: :test}
]
end
end