diff options
author | Tristan Sloughter <tristan.sloughter@gmail.com> | 2014-12-21 14:46:12 -0600 |
---|---|---|
committer | Tristan Sloughter <tristan.sloughter@gmail.com> | 2014-12-21 14:46:12 -0600 |
commit | e81e6d2e31bf59e2f5ecd25c5f7c2f7a8dafd4e2 (patch) | |
tree | 3601bc03e68d4fd764e2b039a426b3ea9b150f43 | |
parent | 3aeb76c10b7f9311b4070d473f39032996170145 (diff) | |
parent | afdc62409edcaad251ca7f5830d9c90bf9a881aa (diff) |
Merge pull request #71 from tsloughter/master
add erlydtl namespace
-rw-r--r-- | rebar.config | 8 | ||||
-rw-r--r-- | src/rebar_prv_erlydtl_compiler.erl | 8 |
2 files changed, 7 insertions, 9 deletions
diff --git a/rebar.config b/rebar.config index fd3e53f..a9b667e 100644 --- a/rebar.config +++ b/rebar.config @@ -22,14 +22,14 @@ {git, "https://github.com/erlware/erlware_commons.git", {branch, "master"}}}, {providers, "", - {git, "https://github.com/ferd/providers.git", - {branch, "namespaces"}}}, + {git, "https://github.com/tsloughter/providers.git", + {branch, "master"}}}, {erlydtl, ".*", {git, "https://github.com/erlydtl/erlydtl.git", {tag, "0.9.4"}}}, {relx, "", - {git, "https://github.com/tsloughter/relx.git", - {branch, "format_error1"}}}, + {git, "https://github.com/erlware/relx.git", + {branch, "master"}}}, {getopt, "", {git, "https://github.com/jcomellas/getopt.git", {branch, "master"}}}, {meck, "", {git, "https://github.com/eproxus/meck.git", {tag, "0.8.2"}}}]}. diff --git a/src/rebar_prv_erlydtl_compiler.erl b/src/rebar_prv_erlydtl_compiler.erl index 8ae6d03..a922404 100644 --- a/src/rebar_prv_erlydtl_compiler.erl +++ b/src/rebar_prv_erlydtl_compiler.erl @@ -105,7 +105,7 @@ -include("rebar.hrl"). --define(PROVIDER, erlydtl). +-define(PROVIDER, compile). -define(DEPS, []). %% =================================================================== @@ -116,9 +116,10 @@ init(State) -> State1 = rebar_state:add_provider(State, providers:create([{name, ?PROVIDER}, {module, ?MODULE}, + {namespace, erlydtl}, {bare, false}, {deps, ?DEPS}, - {example, "rebar erlydtl compile"}, + {example, "rebar3 erlydtl compile"}, {short_desc, "Compile erlydtl templates."}, {desc, ""}, {opts, []}])), @@ -126,8 +127,6 @@ init(State) -> do(Config) -> MultiDtlOpts = erlydtl_opts(Config), - OrigPath = code:get_path(), - %true = code:add_path(rebar_utils:ebin_dir()), Result = lists:foldl(fun(DtlOpts, _) -> file:make_dir(option(out_dir, DtlOpts)), @@ -143,7 +142,6 @@ do(Config) -> {recursive, option(recursive, DtlOpts)}]) end, ok, MultiDtlOpts), - true = code:set_path(OrigPath), {Result, Config}. -spec format_error(any()) -> iolist(). |