From c832b567dba73ddbed961b265f2018b3f2cb45ae Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Mon, 10 Nov 2014 19:03:25 +0000 Subject: Redo templates with docs and whatnot This totally breaks compatibility with rebar2, and maybe it shouldn't have. --- priv/templates/release.template | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 priv/templates/release.template (limited to 'priv/templates/release.template') diff --git a/priv/templates/release.template b/priv/templates/release.template new file mode 100644 index 0000000..5e3ba1a --- /dev/null +++ b/priv/templates/release.template @@ -0,0 +1,15 @@ +{description, "OTP Release structure for executable programs"}. +{variables, [ + {appid, "myapp", "Name of the OTP release. An app with this name will also be created."}, + {desc, "An OTP application", "Short description of the release's main app's purpose"} +]}. +{template, "app.erl.dtl", "{{apps_dir}}/{{appid}}/src/{{appid}}_app.erl"}. +{template, "sup.erl.dtl", "{{apps_dir}}/{{appid}}/src/{{appid}}_sup.erl"}. +{template, "otp_app.app.src.dtl", "{{apps_dir}}/{{appid}}/src/{{appid}}.app.src"}. +{template, "rebar.config.dtl", "rebar.config"}. +{template, "relx.config.dtl", "relx.config"}. +{template, "sys.config.dtl", "config/sys.config"}. +{template, "vm.args.dtl", "config/vm.args"}. +{template, "gitignore.dtl", ".gitignore"}. +{template, "LICENSE.dtl", "LICENSE"}. +{template, "README.md.dtl", "README.md"}. -- cgit v1.1 From 392abf148122be020f3955005497d488d3f881fd Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Tue, 11 Nov 2014 01:27:41 +0000 Subject: First unkeyed var is now 'name', appid -> name The first variable can be unkeyed and the provider will sub in the variable name 'name'. Additionally, the built-in templates and documentation have been updated so that 'appid' is now 'name' and the alternative commands are shown. --- priv/templates/release.template | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'priv/templates/release.template') diff --git a/priv/templates/release.template b/priv/templates/release.template index 5e3ba1a..3539392 100644 --- a/priv/templates/release.template +++ b/priv/templates/release.template @@ -1,11 +1,11 @@ {description, "OTP Release structure for executable programs"}. {variables, [ - {appid, "myapp", "Name of the OTP release. An app with this name will also be created."}, + {name, "myapp", "Name of the OTP release. An app with this name will also be created."}, {desc, "An OTP application", "Short description of the release's main app's purpose"} ]}. -{template, "app.erl.dtl", "{{apps_dir}}/{{appid}}/src/{{appid}}_app.erl"}. -{template, "sup.erl.dtl", "{{apps_dir}}/{{appid}}/src/{{appid}}_sup.erl"}. -{template, "otp_app.app.src.dtl", "{{apps_dir}}/{{appid}}/src/{{appid}}.app.src"}. +{template, "app.erl.dtl", "{{apps_dir}}/{{name}}/src/{{name}}_app.erl"}. +{template, "sup.erl.dtl", "{{apps_dir}}/{{name}}/src/{{name}}_sup.erl"}. +{template, "otp_app.app.src.dtl", "{{apps_dir}}/{{name}}/src/{{name}}.app.src"}. {template, "rebar.config.dtl", "rebar.config"}. {template, "relx.config.dtl", "relx.config"}. {template, "sys.config.dtl", "config/sys.config"}. -- cgit v1.1