Skip to content

Commit 5947019

Browse files
committed
feat: use nova feat/priv-dir-routes, serve arizona_core assets via {App, Path} route
1 parent 8b6a8be commit 5947019

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

rebar.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
]}.
1313

1414
{deps, [
15-
{nova, {git, "https://github.com/novaframework/nova.git", {branch, "chore/upgrade-cowboy"}}},
15+
{nova, {git, "https://github.com/novaframework/nova.git", {branch, "feat/priv-dir-routes"}}},
1616
enotify
1717
]}.
1818

rebar.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
{<<"jhn_stdlib">>,{pkg,<<"jhn_stdlib">>,<<"5.4.0">>},1},
77
{<<"nova">>,
88
{git,"https://github.com/novaframework/nova.git",
9-
{ref,"5aaeb9a59d3f62bc93caf9bb7f8a7224042be58f"}},
9+
{ref,"30778d7888f4fe50a0cfbf70d300b3595aac6ca8"}},
1010
0},
1111
{<<"ranch">>,{pkg,<<"ranch">>,<<"2.2.0">>},2},
1212
{<<"routing_tree">>,{pkg,<<"routing_tree">>,<<"1.0.11">>},1},

src/rebar3_nova_new.erl

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,8 @@ rebar_erlydtl_opts(_) ->
186186
rebar_deps(Flags) ->
187187
BaseDeps =
188188
case maps:get(lfe, Flags) of
189-
true -> [" {nova, {git, \"https://github.com/novaframework/nova.git\", {branch, \"chore/upgrade-cowboy\"}}},\n", " {logjam, \"1.2.4\"}"];
190-
false -> [" {nova, {git, \"https://github.com/novaframework/nova.git\", {branch, \"chore/upgrade-cowboy\"}}},\n", " {flatlog, \"0.1.2\"}"]
189+
true -> [" {nova, {git, \"https://github.com/novaframework/nova.git\", {branch, \"feat/priv-dir-routes\"}}},\n", " {logjam, \"1.2.4\"}"];
190+
false -> [" {nova, {git, \"https://github.com/novaframework/nova.git\", {branch, \"feat/priv-dir-routes\"}}},\n", " {flatlog, \"0.1.2\"}"]
191191
end,
192192
KuraDep =
193193
case maps:get(kura, Flags) of
@@ -623,7 +623,8 @@ generate_router(Name, #{arizona := true}) ->
623623
"_home_view), #{methods => [get]}},\n",
624624
" {\"/heartbeat\", fun(_) -> {status, 200} end, #{methods => [get]}},\n",
625625
" {\"/live\", arizona_nova_websocket, #{protocol => ws}},\n",
626-
" {\"/assets/[...]\", \"static/assets\"}\n",
626+
" {\"/assets/[...]\", \"static/assets\"},\n",
627+
" {\"/arizona/[...]\", {arizona_core, \"static/assets\"}}\n",
627628
" ]\n",
628629
" }\n",
629630
" ].\n"
@@ -1135,9 +1136,9 @@ generate_home_view(Name) ->
11351136
" {title, [], <<\"",
11361137
Name,
11371138
"\">>},\n",
1138-
" {link, [{rel, <<\"stylesheet\">>}, {href, <<\"/assets/css/app.css\">>}], []},\n",
1139+
" {link, [{rel, <<\"stylesheet\">>}, {href, <<\"/assets/app.css\">>}], []},\n",
11391140
" {script, [{type, <<\"module\">>}], <<\"\"\"\n",
1140-
" import Arizona from '/assets/js/arizona.min.js';\n",
1141+
" import Arizona from '/arizona/js/arizona.min.js';\n",
11411142
" globalThis.arizona = new Arizona();\n",
11421143
" arizona.connect('/live');\n",
11431144
" \"\"\">>}\n",

0 commit comments

Comments
 (0)