Skip to content

Commit

Permalink
misc
Browse files Browse the repository at this point in the history
  • Loading branch information
mayel committed Dec 21, 2024
1 parent bb71838 commit add3bdb
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions flavours/classic/config/config.exs
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import Config

yes? = ~w(true yes 1)
no? = ~w(false no 0)

default_flavour = "classic"
flavour = System.get_env("FLAVOUR", default_flavour)
flavour_path = System.get_env("FLAVOUR_PATH", "flavours/" <> flavour)
project_root = File.cwd!()
as_desktop_app? = System.get_env("AS_DESKTOP_APP") in ["1", "true"]
as_desktop_app? = System.get_env("AS_DESKTOP_APP") in yes?
env = config_env()

bonfire_deps =
Expand Down Expand Up @@ -34,7 +37,7 @@ config :bonfire,
flavour_path: flavour_path,
app_name: System.get_env("APP_NAME", "Bonfire"),
repo_module: repo,
use_pathex: System.get_env("WITH_PATHEX") != "0",
use_pathex: System.get_env("WITH_PATHEX") not in no?,
web_module: Bonfire.UI.Common.Web,
endpoint_module: if(as_desktop_app?, do: Bonfire.Desktop.Endpoint, else: Bonfire.Web.Endpoint),
mailer_module: Bonfire.Mailer,
Expand Down Expand Up @@ -322,7 +325,7 @@ if Code.ensure_loaded?(Bonfire.Mixer) and Bonfire.Mixer.compile_disabled?() do
end
end

if System.get_env("WITH_API_GRAPHQL") != "yes" do
if System.get_env("WITH_API_GRAPHQL") not in yes? do
config :bonfire_api_graphql,
modularity: :disabled
else
Expand Down

0 comments on commit add3bdb

Please sign in to comment.