This repository has been archived by the owner on Jul 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathmix.exs
169 lines (144 loc) · 4.99 KB
/
mix.exs
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
defmodule Franklin.MixProject do
use Mix.Project
def project do
[
app: :franklin,
version: "0.1.0",
elixir: "~> 1.14.0",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
aliases: aliases(),
deps: deps(),
# ExDoc Related Configuration
name: "Franklin",
source_url: "https://github.com/zorn/franklin",
homepage_url: "https://github.com/zorn/franklin",
docs: docs(),
dialyzer: [
plt_file: {:no_warn, "priv/plts/dialyzer.plt"}
]
]
end
# Configuration for the OTP application.
#
# Type `mix help compile.app` for more information.
def application do
[
mod: {Franklin.Application, []},
extra_applications: [:logger, :runtime_tools, :eventstore, :crypto, :yaml_front_matter]
]
end
# Specifies which paths to compile per environment.
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
# Specifies your project dependencies.
#
# Type `mix help deps` for examples and options.
defp deps do
[
# Core Phoenix Deps
{:ecto_sql, "~> 3.6"},
{:esbuild, "~> 0.7", runtime: Mix.env() == :dev},
{:finch, "~> 0.14"},
{:floki, ">= 0.30.0", only: :test},
{:gettext, "~> 0.20"},
{:jason, "~> 1.2"},
{:phoenix_ecto, "~> 4.4"},
{:phoenix_html, "~> 3.3"},
{:phoenix_live_dashboard, "~> 0.7.2"},
{:phoenix_live_reload, "~> 1.2", only: :dev},
{:phoenix_live_view, "~> 0.18.16"},
{:phoenix, "~> 1.7.2"},
{:plug_cowboy, "~> 2.5"},
{:postgrex, ">= 0.0.0"},
{:swoosh, "~> 1.3"},
{:telemetry_metrics, "~> 0.6"},
{:telemetry_poller, "~> 1.0"},
# Used alongside the generated phx.gen.auth code.
{:argon2_elixir, "~> 3.0"},
# To help build the HTML documentation.
{:ex_doc, "~> 0.27", only: :dev, runtime: false},
# Commanded is the CQRS library we are building on.
{:commanded, "~> 1.3"},
{:commanded_eventstore_adapter, "~> 1.2"},
{:cors_plug, "~> 3.0"},
{:commanded_ecto_projections, "~> 1.2"},
# To help us build with TDD.
{:mix_test_watch, "~> 1.0", only: [:dev, :test], runtime: false},
# For frontend styling.
{:tailwind, "~> 0.2.0", runtime: Mix.env() == :dev},
# For component management.
{:phoenix_storybook, "~> 0.5.0"},
# To help generate some fake test data.
{:faker, "~> 0.17", only: :test},
# To help keep repetitive maps shorter in tests.
{:shorter_maps, "~> 2.0"},
# Static analysis
{:credo, "~> 1.6", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.0", only: [:dev], runtime: false},
# To render markdown content
{:earmark, "~> 1.4"},
# To help process historical content for seeds and imports.
{:yaml_front_matter, "~> 1.0.0"},
# To help generate valid URL slugs.
{:slugify, "~> 1.3"},
# To help with generating RSS feeds.
{:xml_builder, "~> 2.1"},
# For S3 uploads.
{:ex_aws, "~> 2.1"},
{:ex_aws_s3, "~> 2.0"},
{:hackney, "~> 1.15"},
{:sweet_xml, "~> 0.6"},
# GitHub-like components to help style the admin.
{:primer_live, "~> 0.3.0"},
# For providing graphql.
{:absinthe, "~> 1.7"},
{:absinthe_plug, "~> 1.5"}
]
end
defp docs do
[
main: "Franklin",
extra_section: "GUIDES",
extras: extras(),
groups_for_extras: groups_for_extras()
]
end
defp extras do
[
"guides/philosophy/testing.md",
"guides/code_style/context_accessors.md",
"guides/decisions/about.md",
"guides/decisions/datetime_column_types.md",
"guides/decisions/s3_will_not_enforce_file_constraints.md"
]
end
defp groups_for_extras do
[
Philosophy: ~r/guides\/philosophy\/[^\/]+\.md/,
"Code Style": ~r/guides\/code_style\/[^\/]+\.md/,
Decisions: ~r/guides\/decisions\/[^\/]+\.md/
]
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", "event_store.setup", "ecto.setup", "assets.setup", "assets.build"],
"event_store.setup": ["event_store.create", "event_store.init"],
"ecto.setup": ["ecto.create", "ecto.migrate", "run priv/repo/seeds.exs"],
reset_databases: ["event_store.reset", "ecto.reset"],
"event_store.reset": ["event_store.drop", "event_store.setup"],
"ecto.reset": ["ecto.drop", "ecto.setup"],
test: ["ecto.create --quiet", "ecto.migrate --quiet", "test"],
"assets.setup": ["tailwind.install --if-missing", "esbuild.install --if-missing"],
"assets.build": ["tailwind default", "esbuild default"],
"assets.deploy": ["tailwind default --minify", "esbuild default --minify", "phx.digest"],
lint: ["credo --strict", "dialyzer"]
]
end
end