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

  @impl Mix.Task
  def run([]) do
    {_, 0} = System.cmd("npm", ~w(install))
    File.cp_r!("node_modules/video.js/dist", "priv/static/video.js")
    File.cp_r!("node_modules/video.js/LICENSE", "priv/static/video.js/LICENSE")
    nil
  end
end