diff options
Diffstat (limited to 'priv/templates')
-rw-r--r-- | priv/templates/simplelib.app.src | 14 | ||||
-rw-r--r-- | priv/templates/simplelib.erl | 18 | ||||
-rw-r--r-- | priv/templates/simplelib.template | 3 | ||||
-rwxr-xr-x | priv/templates/simplenode.runner | 1 |
4 files changed, 36 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..2c4451f --- /dev/null +++ b/priv/templates/simplelib.erl @@ -0,0 +1,18 @@ +-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"}. diff --git a/priv/templates/simplenode.runner b/priv/templates/simplenode.runner index 260d067..032eb28 100755 --- a/priv/templates/simplenode.runner +++ b/priv/templates/simplenode.runner @@ -16,6 +16,7 @@ fi unset POSIX_SHELL RUNNER_SCRIPT_DIR=$(cd ${0%/*} && pwd -P) +RUNNER_SCRIPT=${0##*/} CALLER_DIR=$PWD |