Skip to content

Commit ad63eaf

Browse files
committed
Updated documentation
1 parent 253d9ee commit ad63eaf

3 files changed

Lines changed: 25 additions & 1 deletion

File tree

lib/elixir_script/watcher.ex

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ defmodule ElixirScript.Watcher do
22
use GenServer
33
require Logger
44

5+
@moduledoc """
6+
Watches the input folder for changes and calls the ElixirScript compiler
7+
"""
8+
9+
510
def start_link(input, options) do
611
GenServer.start_link(__MODULE__, [input: input, options: options])
712
end

lib/mix/tasks/compile.elixir_script.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ defmodule Mix.Tasks.Compile.ElixirScript do
44
@moduledoc """
55
Mix compiler to allow mix to compile Elixirscript source files into JavaScript
66
7-
Looks for an `elixirscript` key in your mix project config
7+
Looks for an `elixir_script` key in your mix project config
88
99
def project do
1010
[

lib/mix/tasks/elixirscript.watch.ex

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,25 @@ defmodule Mix.Tasks.Elixirscript.Watch do
33

44
@shortdoc "Watches ElixirScript files for changes"
55

6+
@moduledoc """
7+
Watches ElixirScript files for changes
8+
9+
Looks for the `elixir_script` key in your mix project config
10+
11+
def project do
12+
[
13+
app: :my_app,
14+
version: "0.1.0",
15+
elixir: "~> 1.0",
16+
deps: deps,
17+
elixir_script: [ input: "src/exjs", output: "dest/js"],
18+
compilers: [:elixir_script] ++ Mix.compilers
19+
]
20+
end
21+
"""
22+
23+
24+
625
def run(_) do
726
Mix.Task.run "app.start"
827

0 commit comments

Comments
 (0)