Skip to content

Commit 2a73985

Browse files
committed
Allow CLI to accept muliple paths
1 parent 1363b1a commit 2a73985

4 files changed

Lines changed: 10 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/)
55
and this project adheres to [Semantic Versioning](http://semver.org/).
66

7+
## [0.23.4] - Unreleased
8+
9+
### Fixed
10+
- CLI now allows a comma-separated or space-separated list of paths
711

812
## [0.23.3] - 2016-11-18
913

lib/elixir_script.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ defmodule ElixirScript do
114114
@doc """
115115
Compiles the elixir files found at the given path
116116
"""
117-
@spec compile_path(binary, Map.t) :: [binary | {binary, binary} | :ok]
117+
@spec compile_path(binary | [binary], Map.t) :: [binary | {binary, binary} | :ok]
118118
def compile_path(path, opts \\ %{}) do
119119

120120
opts = build_compiler_options(opts)

lib/elixir_script/cli.ex

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ defmodule ElixirScript.CLI do
7979
true ->
8080
ElixirScript.compile(input, compile_opts)
8181
_ ->
82+
input = input
83+
|> String.split([" ", ","], trim: true)
84+
8285
ElixirScript.compile_path(input, compile_opts)
8386

8487
if watch do
@@ -97,4 +100,5 @@ defmodule ElixirScript.CLI do
97100
end
98101
end)
99102
end
103+
100104
end

mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ defmodule ElixirScript.Mixfile do
44
def project do
55
[
66
app: :elixir_script,
7-
version: "0.23.3",
7+
version: "0.23.4-dev",
88
elixir: "~> 1.0",
99
escript: escript_config,
1010
deps: deps,

0 commit comments

Comments
 (0)