-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathmix.exs
More file actions
111 lines (102 loc) · 2.99 KB
/
mix.exs
File metadata and controls
111 lines (102 loc) · 2.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
defmodule QuickBEAM.MixProject do
use Mix.Project
@version "0.8.1"
@source_url "https://github.com/elixir-volt/quickbeam"
def project do
[
app: :quickbeam,
version: @version,
elixir: "~> 1.15",
start_permanent: Mix.env() == :prod,
deps: deps(),
aliases: aliases(),
dialyzer: [plt_add_apps: [:crypto, :inets, :ssl, :public_key]],
name: "QuickBEAM",
description:
"JavaScript runtime for the BEAM — Web APIs backed by OTP, native DOM, and a built-in TypeScript toolchain.",
source_url: @source_url,
homepage_url: @source_url,
package: package(),
docs: docs()
]
end
def application do
[
extra_applications: [:logger, :inets, :ssl, :public_key],
mod: {QuickBEAM.Application, []}
]
end
def cli do
[preferred_envs: [ci: :test]]
end
defp aliases do
[
lint: [
"format --check-formatted",
"credo --strict",
"ex_dna",
"cmd zlint lib/quickbeam/*.zig lib/quickbeam/napi/*.zig",
"cmd npx oxlint -c oxlint.json --type-aware --type-check priv/ts/",
"cmd npx jscpd lib/quickbeam/*.zig priv/ts/*.ts --min-tokens 50 --threshold 0"
],
ci: [
"compile --warnings-as-errors",
"format --check-formatted",
"credo --strict",
"dialyzer",
"ex_dna",
"cmd zlint lib/quickbeam/*.zig lib/quickbeam/napi/*.zig",
"cmd npx oxlint -c oxlint.json --type-aware --type-check priv/ts/",
"cmd npx jscpd lib/quickbeam/*.zig priv/ts/*.ts --min-tokens 50 --threshold 0",
"test --no-start --exclude napi_addon --exclude napi_sqlite"
],
"fuzz.sanity": "cmd --cd fuzz zig build test"
]
end
defp deps do
[
{:zigler_precompiled, "~> 0.1.2"},
{:zigler, "~> 0.15.2", runtime: false, optional: true},
{:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false},
{:credo, "~> 1.7", only: [:dev, :test], runtime: false},
{:ex_dna, "~> 1.1", only: [:dev, :test], runtime: false},
{:ex_slop, "~> 0.2", only: [:dev, :test], runtime: false},
{:oxc, "~> 0.5.0"},
{:npm, "~> 0.5.1"},
{:nimble_pool, "~> 1.1"},
{:bandit, "~> 1.0", only: :test},
{:benchee, "~> 1.3", only: :bench, runtime: false},
{:quickjs_ex, "~> 0.3.1", only: :bench, runtime: false},
{:ex_doc, "~> 0.35", only: :dev, runtime: false}
]
end
defp package do
[
licenses: ["MIT"],
links: %{
"GitHub" => @source_url
},
files: ~w[
lib priv/c_src priv/ts
mix.exs README.md LICENSE CHANGELOG.md
checksum-QuickBEAM.Native.exs
.formatter.exs
]
]
end
defp docs do
[
main: "QuickBEAM",
extras: [
"README.md",
"docs/javascript-api.md",
"docs/architecture.md",
"CHANGELOG.md"
],
groups_for_extras: [
Guides: ["docs/javascript-api.md", "docs/architecture.md"]
],
source_ref: "v#{@version}"
]
end
end