/
config.exs
77 lines (68 loc) · 2.73 KB
/
config.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
# This file is responsible for configuring your umbrella
# and **all applications** and their dependencies with the
# help of the Config module.
#
# Note that all applications in your umbrella share the
# same configuration and dependencies, which is why they
# all use the same configuration file. If you want different
# configurations or dependencies per app, it is best to
# move said applications out of the umbrella.
import Config
# Configure Mix tasks and generators
config :phx_wc_storybook,
namespace: PhxWCStorybook
config :phx_wc_storybook_web,
namespace: PhxWCStorybookWeb,
generators: [context_app: :phx_wc_storybook]
# Configures the endpoint
config :phx_wc_storybook_web, PhxWCStorybookWeb.Endpoint,
url: [host: "localhost"],
render_errors: [view: PhxWCStorybookWeb.ErrorView, accepts: ~w(html json), layout: false],
pubsub_server: PhxWCStorybook.PubSub,
live_view: [signing_salt: "HkF5qV0r"]
config :phx_wc_storybook_web, PhxWCStorybookWeb.Storybook,
js_path: "/assets/app.js",
css_path: "/assets/app.css"
config :tailwind,
version: "3.1.6",
default: [
args: ~w(
--config=tailwind.config.js
--input=css/phoenix_webcomponent.css
--output=../priv/static/phoenix_webcomponent.css
),
cd: Path.expand("../apps/phoenix_webcomponent/assets", __DIR__),
env: %{"NODE_PATH" => "#{Path.expand("../deps", __DIR__)}:#{Path.expand("../apps", __DIR__)}"}
],
storybook: [
args: ~w(
--config=tailwind.config.js
--input=css/app.css
--output=../priv/static/assets/app.css
),
cd: Path.expand("../apps/phx_wc_storybook_web/assets", __DIR__),
env: %{"NODE_PATH" => "#{Path.expand("../deps", __DIR__)}:#{Path.expand("../apps", __DIR__)}"}
]
# Configure esbuild (the version is required)
config :esbuild,
version: "0.14.29",
default: [
args: ~w(js/phoenix_webcomponent.js --target=es2017 --format=cjs --outdir=../priv/static/),
cd: Path.expand("../apps/phoenix_webcomponent/assets", __DIR__),
env: %{"NODE_PATH" => "#{Path.expand("../deps", __DIR__)}:#{Path.expand("../apps", __DIR__)}"}
],
storybook: [
args:
~w(js/app.js --bundle --target=es2021 --outdir=../priv/static/assets --external:/fonts/* --external:/images/*),
cd: Path.expand("../apps/phx_wc_storybook_web/assets", __DIR__),
env: %{"NODE_PATH" => "#{Path.expand("../deps", __DIR__)}:#{Path.expand("../apps", __DIR__)}"}
]
# Configures Elixir's Logger
config :logger, :console,
format: "$time $metadata[$level] $message\n",
metadata: [:request_id]
# Use Jason for JSON parsing in Phoenix
config :phoenix, :json_library, Jason
# Import environment specific config. This must remain at the bottom
# of this file so it overrides the configuration defined above.
import_config "#{config_env()}.exs"