Packages

Duskmoon fork of npm_ex — resolve, fetch, and manage npm dependencies with Mix tasks.

Current section

Files

Jump to
duskmoon_npm lib mix tasks npm.get.ex
Raw

lib/mix/tasks/npm.get.ex

defmodule Mix.Tasks.Npm.Get do
@shortdoc "Fetch locked npm packages"
@moduledoc """
Fetch npm packages from `npm.lock` without re-resolving.
mix npm.get
Downloads any packages that are not already present in `deps/npm/`.
Run `mix npm.install` to resolve and update the lockfile.
"""
use Mix.Task
@impl true
def run([]) do
Application.ensure_all_started(:req)
NPM.get()
end
def run(_) do
Mix.shell().error("Usage: mix npm.get")
end
end