-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmix.exs
More file actions
105 lines (95 loc) · 2.67 KB
/
Copy pathmix.exs
File metadata and controls
105 lines (95 loc) · 2.67 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
defmodule PeekAppSDK.MixProject do
use Mix.Project
@version "0.0.1"
def project do
[
app: :peek_app_sdk,
name: "Peek SDK",
source_url: "https://github.com/peek-travel/peek_app_sdk",
version: @version,
elixir: "~> 1.19",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
aliases: aliases(),
deps: deps(),
test_coverage: [
tool: ExCoveralls,
test_task: "test",
summary: [threshold: 100]
],
package: package()
]
end
def cli do
[
preferred_envs: [
coveralls: :test,
"coveralls.detail": :test,
"coveralls.post": :test,
"coveralls.html": :test,
"coveralls.github": :test,
"coveralls.lcov": :test
]
]
end
# Configuration for the OTP application.
#
# Type `mix help compile.app` for more information.
def application do
[
mod: {PeekAppSDK.Application, []},
extra_applications: [:logger, :runtime_tools]
]
end
# Specifies which paths to compile per environment.
defp elixirc_paths(:test), do: ["lib", "test/support", "assets"]
defp elixirc_paths(_), do: ["lib", "assets"]
# Specifies your project dependencies.
#
# Type `mix help deps` for examples and options.
defp deps do
[
{:gettext, "~> 1.0"},
{:joken, "~> 2.3"},
{:tesla, "~> 1.4"},
{:phoenix, "~> 1.7"},
{:phoenix_live_view, "~> 1.0"},
{:finch, "~> 0.13"},
{:retry, "~> 0.18"},
{:esbuild, "~> 0.8", runtime: Mix.env() == :dev},
# Test dependencies
{:mimic, "~> 1.7", only: :test},
{:excoveralls, "~> 0.18", only: :test},
{:bypass, "~> 2.1", only: :test},
# Development dependencies
{:credo, "~> 1.7", only: [:dev, :test], runtime: false}
]
end
# Aliases are shortcuts or tasks specific to the current project.
# For example, to install project dependencies and perform other setup tasks, run:
#
# $ mix setup
#
# See the documentation for `Mix` for more info on aliases.
defp aliases do
[
setup: ["deps.get"],
"assets.setup": ["esbuild.install --if-missing"],
"assets.build": ["esbuild odyssey_hooks", "esbuild odyssey_web_components"],
"assets.deploy": [
"esbuild odyssey_hooks --minify",
"esbuild odyssey_web_components --minify",
"phx.digest"
]
]
end
defp package do
[
licenses: ["MIT"],
links: %{
"GitHub" => "https://github.com/peek-travel/peek_app_sdk"
},
files: ~w(mix.exs lib/** assets/** package.json priv/static/odyssey_hooks.min.js priv/static/odyssey_web_components.min.js)
]
end
end