Created
November 28, 2017 21:27
-
-
Save wende/62399be4c0e9c1e41e272cdae7b5b8a7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule ElchemyDeps do | |
def init(project, {__MODULE, _}) do | |
# We don't need additional elixirc paths, and elchemy paths should be | |
# configurable by the user (and there already is a default value) | |
project | |
|> put_in(:compilers, [:elchemy | (project[:compilers] || [])]) | |
|> put_in(:deps, project[:deps] ++ deps()) | |
end | |
def deps do | |
[] # Required elchemy paths (like Poison and whatnot) | |
++ [] # Get deps from the elm-package.json, and recursively do the same | |
end | |
end | |
ElchemyDeps | |
# In mix.exs do: | |
# deps: deps()] |> Code.eval_file("elchemy.exs").init() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment