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/plugin.template | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'priv/templates/plugin.template') diff --git a/priv/templates/plugin.template b/priv/templates/plugin.template index bc44863..7235b60 100644 --- a/priv/templates/plugin.template +++ b/priv/templates/plugin.template @@ -1,7 +1,11 @@ -{variables, []}. -{template, "plugin.erl", "src/{{appid}}.erl"}. -{template, "otp_lib.app.src", "src/{{appid}}.app.src"}. -{template, "rebar.config", "rebar.config"}. -{template, "gitignore", ".gitignore"}. -{template, "LICENSE", "LICENSE"}. -{template, "plugin_README.md", "README.md"}. +{description, "Rebar3 plugin"}. +{variables, [ + {appid, "myplugin", "Name of the plugin"}, + {desc, "A rebar plugin", "Short description of the plugin's purpose"} +]}. +{template, "plugin.erl.dtl", "src/{{appid}}.erl"}. +{template, "otp_lib.app.src.dtl", "src/{{appid}}.app.src"}. +{template, "rebar.config.dtl", "rebar.config"}. +{template, "gitignore.dtl", ".gitignore"}. +{template, "LICENSE.dtl", "LICENSE"}. +{template, "plugin_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/plugin.template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'priv/templates/plugin.template') diff --git a/priv/templates/plugin.template b/priv/templates/plugin.template index 7235b60..a7e15cc 100644 --- a/priv/templates/plugin.template +++ b/priv/templates/plugin.template @@ -1,10 +1,10 @@ {description, "Rebar3 plugin"}. {variables, [ - {appid, "myplugin", "Name of the plugin"}, + {name, "myplugin", "Name of the plugin"}, {desc, "A rebar plugin", "Short description of the plugin's purpose"} ]}. -{template, "plugin.erl.dtl", "src/{{appid}}.erl"}. -{template, "otp_lib.app.src.dtl", "src/{{appid}}.app.src"}. +{template, "plugin.erl.dtl", "src/{{name}}.erl"}. +{template, "otp_lib.app.src.dtl", "src/{{name}}.app.src"}. {template, "rebar.config.dtl", "rebar.config"}. {template, "gitignore.dtl", ".gitignore"}. {template, "LICENSE.dtl", "LICENSE"}. -- cgit v1.1