diff options
author | David Reid <dreid@mochimedia.com> | 2010-11-11 09:41:13 -0800 |
---|---|---|
committer | Tuncer Ayaz <tuncer.ayaz@gmail.com> | 2010-12-22 17:56:52 +0100 |
commit | 63d5ceb61d68af7f1847e3442a1d3f56b6808672 (patch) | |
tree | 26a5abcfb65b4b25c790fc8a2aaf2b02c4557e04 /ebin | |
parent | 9b0d35d9869801d6ee52fde8ba443b07d95892e8 (diff) |
Support single level of nested template variables
Add support for defining template variables of the following form:
{variables, [{appid, "mochiwebapp"},
{author, "Mochi Media <dev@mochimedia.com>"},
{year, "2010"},
{version, "0.1"},
{port, 8080},
{dest, "{{appid}}"}]}.
Where dest may be overridden on the commandline but will default to
being the appid. Mochiweb uses this so that we can create new
projects from the template in a configurable directory.
So
$ rebar create template=mochiwebapp dest=foo appid=bar
I thought about special casing dest but figured it might be generally
useful to be able to nest template vars.
However this patch only does one level of resolution. So if
{variables, [{foo, "{{bar}}"},
{bar, "{{foo}}"}]}.
then bar will end up being the literal string {{bar}} and foo the
literal string {{foo}}.
Diffstat (limited to 'ebin')
0 files changed, 0 insertions, 0 deletions