ソースを参照

Fixes #306: help text consistency

pull/308/head
Fred Hebert 10年前
コミット
a3274e1bc8
6個のファイルの変更14行の追加14行の削除
  1. +7
    -7
      priv/templates/plugin.erl.dtl
  2. +1
    -1
      src/rebar_prv_escriptize.erl
  3. +2
    -2
      src/rebar_prv_help.erl
  4. +1
    -1
      src/rebar_prv_new.erl
  5. +2
    -2
      src/rebar_prv_wtf.erl
  6. +1
    -1
      src/rebar_prv_xref.erl

+ 7
- 7
priv/templates/plugin.erl.dtl ファイルの表示

@ -12,14 +12,14 @@
-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
{example, "rebar {{name}}"}, % How to use the plugin
{opts, []}, % list of options understood by the plugin
{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, "rebar3 {{name}}"}, % How to use the plugin
{opts, []}, % list of options understood by the plugin
{short_desc, "{{desc}}"},
{desc, ""}
{desc, "{{desc}}"}
]),
{ok, rebar_state:add_provider(State, Provider)}.

+ 1
- 1
src/rebar_prv_escriptize.erl ファイルの表示

@ -51,7 +51,7 @@ init(State) ->
{deps, ?DEPS},
{example, "rebar3 escriptize"},
{opts, []},
{short_desc, "Generate escript archive"},
{short_desc, "Generate escript archive."},
{desc, desc()}
]),
{ok, rebar_state:add_provider(State, Provider)}.

+ 2
- 2
src/rebar_prv_help.erl ファイルの表示

@ -58,11 +58,11 @@ format_error(Reason) ->
%% print help/usage string
%%
help(State) ->
?CONSOLE("Rebar is a tool for working with Erlang projects.~n~n", []),
?CONSOLE("Rebar3 is a tool for working with Erlang projects.~n~n", []),
OptSpecList = rebar3:global_option_spec_list(),
getopt:usage(OptSpecList, "rebar", "", []),
?CONSOLE("~nSeveral tasks are available:~n", []),
providers:help(rebar_state:providers(State)),
?CONSOLE("~nRun 'rebar help <TASK>' for details.~n~n", []).
?CONSOLE("~nRun 'rebar3 help <TASK>' for details.~n~n", []).

+ 1
- 1
src/rebar_prv_new.erl ファイルの表示

@ -67,7 +67,7 @@ format_error(Reason) ->
info() ->
io_lib:format(
"Create rebar project based on template and vars.~n"
"Create rebar3 project based on template and vars.~n"
"~n"
"Valid command line options:~n"
" template= [var=foo,...]~n", []).

+ 2
- 2
src/rebar_prv_wtf.erl ファイルの表示

@ -26,8 +26,8 @@ init(State) ->
{bare, false},
{deps, ?DEPS},
{example, "rebar3 wtf \"<task>\""},
{short_desc, "Provide a crash report to be sent to the rebar3 issues page"},
{desc, "Provide a crash report to be sent to the rebar3 issues page"},
{short_desc, "Provide a crash report to be sent to the rebar3 issues page."},
{desc, "Provide a crash report to be sent to the rebar3 issues page."},
{opts, [
{task, undefined, undefined, string, "Task to print details for."}
]}])),

+ 1
- 1
src/rebar_prv_xref.erl ファイルの表示

@ -66,7 +66,7 @@ format_error(Reason) ->
%% ===================================================================
short_desc() ->
"Run cross reference analysis".
"Run cross reference analysis.".
desc() ->
io_lib:format(

読み込み中…
キャンセル
保存