Skip to content

Commit

Permalink
Ensure esbuild app is started before running
Browse files Browse the repository at this point in the history
Closes #70.
  • Loading branch information
josevalim committed Nov 2, 2023
1 parent dda1c03 commit 9073de9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/esbuild.ex
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,8 @@ defmodule Esbuild do
@doc """
Installs, if not available, and then runs `esbuild`.
This task may be invoked concurrently and it will avoid concurrent installs.
Returns the same as `run/2`.
"""
def install_and_run(profile, args) do
Expand All @@ -212,6 +214,8 @@ defmodule Esbuild do

@doc """
Installs esbuild with `configured_version/0`.
If invoked concurrently, this task will perform concurrent installs.
"""
def install do
version = configured_version()
Expand Down
1 change: 1 addition & 0 deletions lib/mix/tasks/esbuild.ex
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ defmodule Mix.Tasks.Esbuild do
Mix.Task.run("app.config")
else
Mix.Task.run("loadpaths")
Application.ensure_all_started(:esbuild)
end

Mix.Task.reenable("esbuild")
Expand Down

0 comments on commit 9073de9

Please sign in to comment.