forked from devinus/markdown
-
Notifications
You must be signed in to change notification settings - Fork 1
/
mix.exs
68 lines (60 loc) · 1.36 KB
/
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
defmodule Mix.Tasks.Compile.Hoedown do
def run(_) do
{make, args} =
case :os.type() do
{:win32, _} -> {"nmake", ["/F", "Makefile.win", "priv\\markdown.dll"]}
{_, :freebsd} -> {"gmake", ["priv/markdown.so"]}
{:unix, _} -> {"make", ["priv/markdown.so"]}
end
case System.cmd(make, args, stderr_to_stdout: true) do
{result, 0} ->
IO.binwrite(result)
:ok
{result, _} ->
IO.binwrite(result)
:error
end
end
end
defmodule Markdown.Mixfile do
use Mix.Project
@version "0.1.1"
def project do
[
app: :markdown,
version: @version,
elixir: ">= 0.14.3 and < 2.0.0",
description: "A simple Elixir Markdown to HTML conversion library.",
package: package(),
compilers: [:hoedown, :elixir, :app],
deps: deps()
]
end
def application do
[]
end
defp deps do
[]
end
defp package() do
[
name: "still_markdown",
licenses: ["Unlicense"],
links: %{"GitHub" => "https://github.com/subvisual/markdown"},
files: [
"src/**/*.c",
"src/**/*.h",
"src/hoedown/Makefile*",
"src/hoedown/hoedown.def",
"src/hoedown/html*",
"priv/.gitignore",
"lib",
"*LICENSE*",
"mix.exs",
"README*",
"mix*",
"Makefile*"
]
]
end
end