Skip to content

Commit

Permalink
we don't need force any more in our issue samples
Browse files Browse the repository at this point in the history
JS assets are built on main automatically now.
  • Loading branch information
SteffenDE committed Jan 28, 2025
1 parent 3f2fe87 commit 3e57e50
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
16 changes: 9 additions & 7 deletions .github/single-file-samples/main.exs
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,17 @@ Mix.install(
# please test your issue using the latest version of LV from GitHub!
{:phoenix_live_view,
github: "phoenixframework/phoenix_live_view", branch: "main", override: true}
],
force: true
]
)

# build the LiveView JavaScript assets (this needs mix and npm available in your path!)
path = Phoenix.LiveView.__info__(:compile)[:source] |> Path.dirname() |> Path.join("../")
System.cmd("mix", ["deps.get"], cd: path, into: IO.binstream())
System.cmd("npm", ["install"], cd: Path.join(path, "./assets"), into: IO.binstream())
System.cmd("mix", ["assets.build"], cd: path, into: IO.binstream())
# if you're trying to test a specific LV commit, it may be necessary to manually build
# the JS assets. To do this, uncomment the following lines:
# this needs mix and npm available in your path!
#
# path = Phoenix.LiveView.__info__(:compile)[:source] |> Path.dirname() |> Path.join("../")
# System.cmd("mix", ["deps.get"], cd: path, into: IO.binstream())
# System.cmd("npm", ["install"], cd: Path.join(path, "./assets"), into: IO.binstream())
# System.cmd("mix", ["assets.build"], cd: path, into: IO.binstream())

defmodule Example.ErrorView do
def render(template, _), do: Phoenix.Controller.status_message_from_template(template)
Expand Down
3 changes: 1 addition & 2 deletions .github/single-file-samples/test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ Mix.install(
{:phoenix_live_view,
github: "phoenixframework/phoenix_live_view", branch: "main", override: true},
{:floki, ">= 0.30.0"}
],
force: true
]
)

ExUnit.start()
Expand Down

0 comments on commit 3e57e50

Please sign in to comment.