bonfire-app/flavours/haha/config/dev.exs

72 lines
1.9 KiB
Elixir
Raw Normal View History

2021-09-26 02:04:07 +00:00
import Config
2022-05-04 02:13:47 +00:00
config :bonfire, Bonfire.Common.Repo,
2021-09-26 02:04:07 +00:00
database: System.get_env("POSTGRES_DB", "bonfire_dev"),
# show_sensitive_data_on_connection_error: true,
pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10")
path_dep_dirs =
Mess.deps([path: "deps.path"], [])
|> Enum.map(&(Keyword.fetch!(elem(&1, 1), :path) <> "/lib"))
config :phoenix_live_reload,
2022-09-12 04:34:14 +00:00
# watch the app's lib/ dir + the dep/lib/ dir of every locally-cloned dep
dirs: path_dep_dirs ++ ["lib/"]
2021-09-26 02:04:07 +00:00
2022-09-12 04:34:14 +00:00
# to include cloned code in patterns
path_dep_patterns = Enum.map(path_dep_dirs, &(String.slice(&1, 2..1000) <> ".*ex"))
# Surface views
path_dep_patterns =
(path_dep_patterns ++ path_dep_dirs) |> Enum.map(&(String.slice(&1, 2..1000) <> ".*sface"))
2021-09-26 02:04:07 +00:00
# Watch static and templates for browser reloading.
config :bonfire, Bonfire.Web.Endpoint,
server: true,
debug_errors: true,
check_origin: false,
code_reloader: true,
watchers: [
2022-05-26 08:47:21 +00:00
yarn: [
2021-09-26 02:04:07 +00:00
"watch.js",
cd: Path.expand("assets", File.cwd!())
],
2022-05-26 08:47:21 +00:00
yarn: [
2021-12-23 04:33:25 +00:00
"watch.css",
2021-09-26 02:04:07 +00:00
cd: Path.expand("assets", File.cwd!())
2022-09-12 04:34:14 +00:00
]
2022-05-26 08:47:21 +00:00
# yarn: [
2021-09-26 02:04:07 +00:00
# "watch.assets",
# cd: Path.expand("assets", File.cwd!())
# ]
],
live_reload: [
2022-09-12 04:34:14 +00:00
patterns:
[
# ~r"^priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$",
# ~r"^priv/gettext/.*(po)$",
# ~r"^web/(live|views)/.*ex$",
# ~r"^lib/.*_live\.ex$",
# ~r".*leex$",
# defp elixirc_paths(:dev), do: ["lib"] ++ catalogues()
2021-09-26 02:04:07 +00:00
2022-09-12 04:34:14 +00:00
~r"lib/.*ex$",
~r".*sface$",
~r"priv/catalogue/.*(ex)$"
] ++ path_dep_patterns
]
2021-09-26 02:04:07 +00:00
config :logger, :console,
level: :debug,
# truncate: :infinity,
2022-09-12 04:34:14 +00:00
# Do not include metadata or timestamps
format: "[$level] $message\n"
2021-09-26 02:04:07 +00:00
config :phoenix, :stacktrace_depth, 30
config :phoenix, :plug_init_mode, :runtime
config :exsync,
src_monitor: true,
extra_extensions: [".leex", ".js", ".css", ".sface"]