Packages

Elixir bindings to the tree-sitter-mf2 grammar. Incremental, error-recovering CST parser for ICU MessageFormat 2 (MF2) messages suitable for editor tooling and LSP use.

Current section

Files

Jump to

mix.exs

defmodule Localize.Mf2.TreeSitter.MixProject do
use Mix.Project
@version "0.1.0"
@source_url "https://github.com/elixir-localize/localize_mf2_treesitter"
def project do
[
app: :localize_mf2_treesitter,
version: @version,
name: "Localize MF2 TreeSitter",
source_url: @source_url,
description: description(),
package: package(),
deps: deps(),
docs: docs(),
elixir: "~> 1.19 or ~> 1.20-rc or ~> 1.20",
start_permanent: Mix.env() == :prod,
elixirc_paths: elixirc_paths(Mix.env()),
compilers: [:elixir_make] ++ Mix.compilers(),
make_makefile: "c_src/Makefile",
make_targets: ["all"],
make_clean: ["clean"],
dialyzer: [
flags: [
:error_handling,
:unknown,
:underspecs,
:extra_return,
:missing_return
]
]
]
end
def application do
[
# `:ssl`, `:inets`, `:public_key` are used by the
# `mix localize_mf2_treesitter.sync` task to fetch the grammar
# from the unpkg CDN. They're OTP-bundled so they add no
# third-party dependency surface.
extra_applications: [:logger, :ssl, :inets, :public_key]
]
end
defp description do
"Elixir bindings to the tree-sitter-mf2 grammar. Incremental, " <>
"error-recovering CST parser for ICU MessageFormat 2 (MF2) messages " <>
"suitable for editor tooling and LSP use."
end
defp package do
[
maintainers: ["Kip Cole"],
licenses: ["Apache-2.0"],
links: %{
"GitHub" => @source_url,
"Changelog" => "#{@source_url}/blob/v#{@version}/CHANGELOG.md"
},
files: [
"lib",
"c_src/Makefile",
"c_src/ts_nif.c",
"c_src/grammar",
"c_src/runtime",
"priv/queries",
"mix.exs",
"README.md",
"CHANGELOG.md",
"LICENSE.md"
]
]
end
defp deps do
[
{:elixir_make, "~> 0.9", runtime: false},
{:ex_doc, "~> 0.34", only: [:dev, :release], runtime: false},
{:dialyxir, "~> 1.4", only: :dev, runtime: false}
]
end
defp docs do
[
source_ref: "v#{@version}",
main: "readme",
formatters: ["html", "markdown"],
extras: ["README.md", "CHANGELOG.md", "LICENSE.md"]
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
end