-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathmix.exs
More file actions
34 lines (29 loc) · 749 Bytes
/
mix.exs
File metadata and controls
34 lines (29 loc) · 749 Bytes
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
defmodule Mix.Tasks.Compile.Hoedown do
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 "0.1.0"
def project do
[app: :markdown,
version: @version,
elixir: ">= 0.14.3 and < 2.0.0",
compilers: [:hoedown, :elixir, :app],
deps: deps()]
end
def application do
[]
end
defp deps do
[{:hoedown, github: "hoedown/hoedown", app: false}]
end
end