forked from devinus/markdown
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmix.exs
40 lines (33 loc) · 982 Bytes
/
mix.exs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
defmodule Mix.Tasks.Compile.Hoedown do
@shortdoc "Compiles Hoedown"
def run(_) do
if match? {:win32, _}, :os.type do
{result, _error_code} = System.cmd("nmake", ["/F", "Makefile.win", "priv\\markdown.dll"], stderr_to_stdout: true)
IO.binwrite result
else
{result, _error_code} = System.cmd("make", ["priv/markdown.so"], stderr_to_stdout: true)
IO.binwrite result
end
:ok
end
end
defmodule Markdown.Mixfile do
use Mix.Project
@version String.strip(File.read!("VERSION"))
def project do
[app: :markdown,
version: @version,
elixir: ">= 0.14.3 and < 2.0.0",
compilers: [:hoedown, :elixir, :app],
deps: deps]
end
# Configuration for the OTP application
def application do
[]
end
# Returns the list of dependencies in the format:
# { :foobar, "~> 0.1", git: "https://github.com/elixir-lang/foobar.git" }
defp deps do
[{:hoedown, github: "hoedown/hoedown", app: false}]
end
end