diff options
author | Fred Hebert <mononcqc@ferd.ca> | 2018-10-05 10:57:58 -0400 |
---|---|---|
committer | Tristan Sloughter <t@crashfast.com> | 2018-10-05 08:57:58 -0600 |
commit | d538be3481e65a00f2817344f697f88b1b55f8c3 (patch) | |
tree | 4d3ced7bfc2c7565be2bc013ec5b596ec388294d /priv | |
parent | dec484643c233fda9c17d38c1854ba7f3f37547b (diff) |
Bump bbmustache and fix templates (#1862)
* bump bbmustache to version 1.6.0
* Use alternative bbmustache brackets in templates
This fixes the problems where literal nested tuples (`{{a,b},c}` or
`{{a,b}}`) would blow up and spaces needed to be inserted.
Diffstat (limited to 'priv')
-rw-r--r-- | priv/templates/otp_app.app.src | 7 | ||||
-rw-r--r-- | priv/templates/plugin_README.md | 13 | ||||
-rw-r--r-- | priv/templates/relx_rebar.config | 5 | ||||
-rw-r--r-- | priv/templates/sup.erl | 7 | ||||
-rw-r--r-- | priv/templates/sys.config | 3 |
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@@, []} ]. |