summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rebar.erl2
-rw-r--r--src/rebar_dia_compiler.erl4
-rw-r--r--src/rebar_templater.erl11
3 files changed, 15 insertions, 2 deletions
diff --git a/src/rebar.erl b/src/rebar.erl
index 8fad12f..00505be 100644
--- a/src/rebar.erl
+++ b/src/rebar.erl
@@ -338,6 +338,7 @@ escriptize Generate escript archive
create template= [var=foo,...] Create skel based on template and vars
create-app [appid=myapp] Create simple app skel
+create-lib [libid=mylib] Create simple lib skel
create-node [nodeid=mynode] Create simple node skel
list-templates List available templates
@@ -437,6 +438,7 @@ command_names() ->
"compile",
"create",
"create-app",
+ "create-lib",
"create-node",
"ct",
"delete-deps",
diff --git a/src/rebar_dia_compiler.erl b/src/rebar_dia_compiler.erl
index f81c734..ba9d159 100644
--- a/src/rebar_dia_compiler.erl
+++ b/src/rebar_dia_compiler.erl
@@ -75,8 +75,8 @@ compile_dia(Source, Target, Config) ->
case diameter_dict_util:parse({path, Source}, []) of
{ok, Spec} ->
FileName = dia_filename(Source, Spec),
- diameter_codegen:from_dict(FileName, Spec, Opts, erl),
- diameter_codegen:from_dict(FileName, Spec, Opts, hrl),
+ _ = diameter_codegen:from_dict(FileName, Spec, Opts, erl),
+ _ = diameter_codegen:from_dict(FileName, Spec, Opts, hrl),
HrlFile = filename:join("src", FileName ++ ".hrl"),
case filelib:is_regular(HrlFile) of
true ->
diff --git a/src/rebar_templater.erl b/src/rebar_templater.erl
index b8f7087..c21daa3 100644
--- a/src/rebar_templater.erl
+++ b/src/rebar_templater.erl
@@ -27,6 +27,7 @@
-module(rebar_templater).
-export(['create-app'/2,
+ 'create-lib'/2,
'create-node'/2,
'list-templates'/2,
create/2]).
@@ -50,6 +51,10 @@
%% Alias for create w/ template=simpleapp
create1(Config, "simpleapp").
+'create-lib'(Config, _File) ->
+ %% Alias for create w/ template=simplelib
+ create1(Config, "simplelib").
+
'create-node'(Config, _File) ->
%% Alias for create w/ template=simplenode
create1(Config, "simplenode").
@@ -116,6 +121,12 @@ info(help, 'create-app') ->
"~n"
"Valid command line options:~n"
" [appid=myapp]~n", []);
+info(help, 'create-lib') ->
+ ?CONSOLE(
+ "Create simple lib skel.~n"
+ "~n"
+ "Valid command line options:~n"
+ " [libid=mylib]~n", []);
info(help, 'create-node') ->
?CONSOLE(
"Create simple node skel.~n"