diff options
author | Pierre Fenoll <pierrefenoll@gmail.com> | 2013-12-19 22:01:25 +0000 |
---|---|---|
committer | Pierre Fenoll <pierrefenoll@gmail.com> | 2013-12-19 22:01:25 +0000 |
commit | c83d037404062138aa32ecbc138529e7c13ba7e2 (patch) | |
tree | f8725245cb426bd4081419c00e9e141d59c1695e /priv/templates | |
parent | b97677c2c270b05e47f247c72f527a32a2c4c15b (diff) |
Add a library template
Diffstat (limited to 'priv/templates')
-rw-r--r-- | priv/templates/simplelib.app.src | 14 | ||||
-rw-r--r-- | priv/templates/simplelib.erl | 20 | ||||
-rw-r--r-- | priv/templates/simplelib.template | 3 |
3 files changed, 37 insertions, 0 deletions
diff --git a/priv/templates/simplelib.app.src b/priv/templates/simplelib.app.src new file mode 100644 index 0000000..752665a --- /dev/null +++ b/priv/templates/simplelib.app.src @@ -0,0 +1,14 @@ +{application, {{libid}}, + [ + {description, "An Erlang {{libid}} library"}, + {vsn, "1"}, + {modules, [ + {{libid}} + ]}, + {registered, []}, + {applications, [ + kernel, + stdlib + ]}, + {env, []} + ]}. diff --git a/priv/templates/simplelib.erl b/priv/templates/simplelib.erl new file mode 100644 index 0000000..384caa5 --- /dev/null +++ b/priv/templates/simplelib.erl @@ -0,0 +1,20 @@ +%% See LICENSE for licensing information. +%% -*- coding: utf-8 -*- +-module({{libid}}). + +%% {{libid}}: {{libid}} library's entry point. + +-export([my_func/0]). + + +%% API + +my_func() -> + ok(). + +%% Internals + +ok() -> + ok. + +%% End of Module. diff --git a/priv/templates/simplelib.template b/priv/templates/simplelib.template new file mode 100644 index 0000000..59d20fa --- /dev/null +++ b/priv/templates/simplelib.template @@ -0,0 +1,3 @@ +{variables, [{libid, "mylib"}]}. +{template, "simplelib.app.src", "src/{{libid}}.app.src"}. +{template, "simplelib.erl", "src/{{libid}}.erl"}. |