diff options
author | Tristan Sloughter <t@crashfast.com> | 2014-11-23 15:04:09 -0600 |
---|---|---|
committer | Tristan Sloughter <t@crashfast.com> | 2014-11-23 15:04:09 -0600 |
commit | e5717547d518aa70ae299f1a1c11b962f0f85e8e (patch) | |
tree | c8a4f7830499e7dea5c960366c792003497a3061 /priv | |
parent | 7e01094ca1727345bf82f50c7e87febcf59283c0 (diff) |
update provider template for changes to format_error/1
Diffstat (limited to 'priv')
-rw-r--r-- | priv/templates/plugin.erl.dtl | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/priv/templates/plugin.erl.dtl b/priv/templates/plugin.erl.dtl index e525ab3..49c3974 100644 --- a/priv/templates/plugin.erl.dtl +++ b/priv/templates/plugin.erl.dtl @@ -1,12 +1,12 @@ -module({{name}}). -behaviour(provider). --export([init/1, do/1, format_error/2]). +-export([init/1, do/1, format_error/1]). -include_lib("rebar3/include/rebar.hrl"). --define(PROVIDER, todo). --define(DEPS, [app_discovery]). +-define(PROVIDER, {{name}}). +-define(DEPS, []). %% =================================================================== %% Public API @@ -14,10 +14,10 @@ -spec init(rebar_state:t()) -> {ok, rebar_state:t()}. init(State) -> Provider = providers:create([ - {name, ?PROVIDER}, % The 'user friendly' name of the task - {module, ?MODULE}, % The module implementation of the task - {bare, true}, % The task can be run by the user, always true - {deps, ?DEPS}, % The list of dependencies + {name, ?PROVIDER}, % The 'user friendly' name of the task + {module, ?MODULE}, % The module implementation of the task + {bare, true}, % The task can be run by the user, always true + {deps, ?DEPS}, % The list of dependencies {example, "rebar {{name}}"}, % How to use the plugin {opts, []}, % list of options understood by the plugin {short_desc, "{{desc}}"}, @@ -31,5 +31,5 @@ do(State) -> {ok, State}. -spec format_error(any()) -> iolist(). -format_error(Reason, State) -> +format_error(Reason) -> io_lib:format("~p", [Reason]). |