Current section
Files
Jump to
Current section
Files
lib/tasks/install_npm_deps.ex
defmodule Mix.Tasks.LiveVue.InstallNpmDeps do
@moduledoc """
Installs npm dependencies for LiveVue.
"""
import LiveVue.Logger
def run(_) do
log_info("-- Installing npm dependencies...")
"npm install --prefix ./assets --save-dev esbuild@^0.16.17 esbuild-plugin-vue3 vue esbuild-plugin-import-glob &&
npm install --prefix ./assets --save ./deps/phoenix ./deps/phoenix_html ./deps/phoenix_live_view ./deps/live_vue"
|> String.to_charlist()
|> :os.cmd()
|> IO.puts()
end
end