Skip to content

Commit

Permalink
pulled in changes from github
Browse files Browse the repository at this point in the history
  • Loading branch information
jfrolich committed Feb 21, 2017
2 parents 5f976fb + ad4b358 commit 5f04483
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/mix/tasks/init.ex
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
defmodule Mix.Tasks.Smoothie.Init do
use Mix.Task
@shortdoc "Initializes smoothie"
@package_version "[email protected]"

def run(_) do
System.cmd "npm", ["i", "[email protected]", "--save-dev"], into: IO.stream(:stdio, :line)
case File.read("yarn.lock") do
{:ok, _} ->
System.cmd "yarn", ["add", @package_version, "--dev"], into: IO.stream(:stdio, :line)
{:error, _} ->
System.cmd "npm", ["i", @package_version, "--save-dev"], into: IO.stream(:stdio, :line)
end
end
end

0 comments on commit 5f04483

Please sign in to comment.