-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmix.exs
More file actions
68 lines (53 loc) · 1.2 KB
/
mix.exs
File metadata and controls
68 lines (53 loc) · 1.2 KB
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.Clobber_koans do
use Mix.Task
@shortdoc "Remove the koans directory"
def run(_) do
File.rm_rf "koans/"
end
end
defmodule Mix.Tasks.Gen do
use Mix.Task
@shortdoc "Prepare by generating the koans"
def run(_) do
unless File.exists? "koans/" do
IO.puts "Creating a fresh set of koans"
File.mkdir "koans"
File.cp_r "src/.", "koans"
end
end
end
defmodule Mix.Tasks.Regen do
use Mix.Task
@shortdoc "Prepare by generating the koans"
def run(_) do
Mix.Task.run "clobber_koans"
Mix.Task.run "gen"
end
end
defmodule Mix.Tasks.Walk_the_path do
use Mix.Task
@shortdoc "Procede along the path to Elixir enlightenment"
def run(_) do
Mix.Task.run "gen"
ElixirKoans.walk_the_path
end
end
defmodule ElixirKoans.Mixfile do
use Mix.Project
def project do
[ app: :elixir_koans,
version: "0.0.1",
elixir: "~> 0.10.2",
deps: deps,
default_task: :walk_the_path ]
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
[]
end
end