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/app.template | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 priv/templates/app.template (limited to 'priv/templates/app.template') diff --git a/priv/templates/app.template b/priv/templates/app.template new file mode 100644 index 0000000..39ec14a --- /dev/null +++ b/priv/templates/app.template @@ -0,0 +1,11 @@ +{description, "OTP Application"}. +{variables, [ + {appid, "mylib", "Name of the OTP application"}, + {desc, "An OTP application", "Short description of the app"} +]}. +{template, "app.erl.dtl", "src/{{appid}}_app.erl"}. +{template, "otp_app.app.src.dtl", "src/{{appid}}.app.src"}. +{template, "rebar.config.dtl", "rebar.config"}. +{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/app.template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'priv/templates/app.template') diff --git a/priv/templates/app.template b/priv/templates/app.template index 39ec14a..78374af 100644 --- a/priv/templates/app.template +++ b/priv/templates/app.template @@ -1,10 +1,10 @@ {description, "OTP Application"}. {variables, [ - {appid, "mylib", "Name of the OTP application"}, + {name, "mylib", "Name of the OTP application"}, {desc, "An OTP application", "Short description of the app"} ]}. -{template, "app.erl.dtl", "src/{{appid}}_app.erl"}. -{template, "otp_app.app.src.dtl", "src/{{appid}}.app.src"}. +{template, "app.erl.dtl", "src/{{name}}_app.erl"}. +{template, "otp_app.app.src.dtl", "src/{{name}}.app.src"}. {template, "rebar.config.dtl", "rebar.config"}. {template, "gitignore.dtl", ".gitignore"}. {template, "LICENSE.dtl", "LICENSE"}. -- cgit v1.1