summaryrefslogtreecommitdiff
path: root/lib/mix/tasks/vendor.ex
blob: fcea65f867827f22fff58e16ac52b952da187985 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
defmodule Mix.Tasks.Vendor do
  use Mix.Task

  @impl Mix.Task
  def run([]) do
    {_, 0} = System.cmd("npm", ~w(install --include=dev))

    File.cp_r!("node_modules/video.js/dist", "priv/static/vendored/video.js")
    File.cp_r!("node_modules/video.js/LICENSE", "priv/static/vendored/video.js/LICENSE")

    nil
  end
end