summaryrefslogtreecommitdiff
path: root/priv/templates
diff options
context:
space:
mode:
Diffstat (limited to 'priv/templates')
-rw-r--r--priv/templates/otp_app.app.src7
-rw-r--r--priv/templates/plugin_README.md13
-rw-r--r--priv/templates/relx_rebar.config5
-rw-r--r--priv/templates/sup.erl7
-rw-r--r--priv/templates/sys.config3
5 files changed, 20 insertions, 15 deletions
diff --git a/priv/templates/otp_app.app.src b/priv/templates/otp_app.app.src
index d694d87..6040089 100644
--- a/priv/templates/otp_app.app.src
+++ b/priv/templates/otp_app.app.src
@@ -1,8 +1,9 @@
-{application, {{name}},
- [{description, "{{desc}}"},
+{{=@@ @@=}}
+{application, @@name@@,
+ [{description, "@@desc@@"},
{vsn, "0.1.0"},
{registered, []},
- {mod, { {{name}}_app, []}},
+ {mod, {@@name@@_app, []}},
{applications,
[kernel,
stdlib
diff --git a/priv/templates/plugin_README.md b/priv/templates/plugin_README.md
index 7f9ba84..1176d95 100644
--- a/priv/templates/plugin_README.md
+++ b/priv/templates/plugin_README.md
@@ -1,7 +1,8 @@
-{{name}}
+{{=@@ @@=}}
+@@name@@
=====
-{{desc}}
+@@desc@@
Build
-----
@@ -14,13 +15,13 @@ Use
Add the plugin to your rebar config:
{plugins, [
- { {{name}}, ".*", {git, "git@host:user/{{name}}.git", {tag, "0.1.0"}}}
+ {@@name@@, {git, "https://host/user/@@name@@.git", {tag, "0.1.0"}}}
]}.
Then just call your plugin directly in an existing application:
- $ rebar3 {{name}}
- ===> Fetching {{name}}
- ===> Compiling {{name}}
+ $ rebar3 @@name@@
+ ===> Fetching @@name@@
+ ===> Compiling @@name@@
<Plugin Output>
diff --git a/priv/templates/relx_rebar.config b/priv/templates/relx_rebar.config
index 81b7dbe..30a629f 100644
--- a/priv/templates/relx_rebar.config
+++ b/priv/templates/relx_rebar.config
@@ -1,8 +1,9 @@
+{{=@@ @@=}}
{erl_opts, [debug_info]}.
{deps, []}.
-{relx, [{release, { {{name}}, "0.1.0" },
- [{{name}},
+{relx, [{release, {@@name@@, "0.1.0"},
+ [@@name@@,
sasl]},
{sys_config, "./config/sys.config"},
diff --git a/priv/templates/sup.erl b/priv/templates/sup.erl
index 0db7155..020021c 100644
--- a/priv/templates/sup.erl
+++ b/priv/templates/sup.erl
@@ -1,9 +1,10 @@
+{{=@@ @@=}}
%%%-------------------------------------------------------------------
-%% @doc {{name}} top level supervisor.
+%% @doc @@name@@ top level supervisor.
%% @end
%%%-------------------------------------------------------------------
--module({{name}}_sup).
+-module(@@name@@_sup).
-behaviour(supervisor).
@@ -31,7 +32,7 @@ start_link() ->
%% Before OTP 18 tuples must be used to specify a child. e.g.
%% Child :: {Id,StartFunc,Restart,Shutdown,Type,Modules}
init([]) ->
- {ok, { {one_for_all, 0, 1}, []} }.
+ {ok, {{one_for_all, 0, 1}, []}}.
%%====================================================================
%% Internal functions
diff --git a/priv/templates/sys.config b/priv/templates/sys.config
index d892fd6..983801f 100644
--- a/priv/templates/sys.config
+++ b/priv/templates/sys.config
@@ -1,3 +1,4 @@
+{{=@@ @@=}}
[
- { {{name}}, []}
+ {@@name@@, []}
].