Florent Gallaire
0e39dc4149
Support switch template instructions
11 年之前
Evax Software
2970fab4b7
Support conditional template instructions
11 年之前
Andrew Thompson
ee8919420d
Support reading mustache 'lists' from files
This commit add support for reading mustache 'lists' from files, so you
can use the list section functionality when templating things.
An example of the list syntax is as follows:
{package_commands, {list, [[{name, "riak"}], [{name, "riak-admin"}], [{name, "search-cmd"}]]}}.
Then you can, for each of the list elements, render some text:
{{#package_commands}}
chmod +x bin/{{name}}
{{/package_commands}}
12 年之前
Tuncer Ayaz
4b8c81fb53
Implement 'rebar help CMD1 CMD2' and extend common 'rebar help' msg
* allow plugins to print help message for implemented commands
* append core rebar.config options to common 'rebar help' message
12 年之前
Tuncer Ayaz
252757c753
Do not use application:set_env
12 年之前
Tuncer Ayaz
e1c9d69d1d
Do not use rebar_config:set_global in rebar_templater
13 年之前
Tuncer Ayaz
d9e6cc3d90
Do not use process dict in rebar_templater
13 年之前
Tuncer Ayaz
fd0697239d
Use lists:foreach because result is ignored
13 年之前
Tuncer Ayaz
385e3f09ba
Decrease indentation in list-templates printout
13 年之前
Tuncer Ayaz
49f3cc4108
Fix crash introduced in 4414f65
via pull/245
13 年之前
Tuncer Ayaz
0c27fd4f7f
rebar_templater: fix comment
13 年之前
Tuncer Ayaz
8d81b322ed
Fix whitespace errors
13 年之前
hirschen
4414f6548a
List substitution variable names in 'list-templates' command.
13 年之前
Jesse Gumm
4f6f41cabb
Fix typos in rebar_templater
13 年之前
Tuncer Ayaz
74ca540939
Use same variable names as file:make_link/2
13 年之前
Przemysław Dąbek
eb23571b8b
Add possibility to make symbolic links
Simple feature, useful to make link to something without copying it.
13 年之前
Tuncer Ayaz
edf4bbc370
Fix error handling bug in {copy,In,Out} template
13 年之前
Tuncer Ayaz
a4ffe1ce62
Use filename:join/1
13 年之前
cloudhead
dd9adac8c4
Add support for {copy, src, dst} to templater
14 年之前
Dave Smith
bda6ee0e48
Centralize variable resolution; add target_dir variable
14 年之前
Dave Smith
c4907b6297
Add support for loading template vars from external file
14 年之前
Tuncer Ayaz
63de05d914
Clean up code
14 年之前
Tuncer Ayaz
c466076ffb
Clean up emacs file local variables
14 年之前
Tuncer Ayaz
3b0568ebb7
Simplify and cleanup rebar_templater
14 年之前
Tuncer Ayaz
58fd80917a
Fix file existence checks
14 年之前
Tuncer Ayaz
a8870807fc
Fix code clarity
14 年之前
David Reid
63d5ceb61d
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}}.
14 年之前
Kostis Sagonas
7dc76d578e
Tidier improvements
14 年之前
Kostis Sagonas
e024778599
Dialyzer related cleanups
14 年之前
Dave Smith
b32eeeafb7
Add support for specifying template directory on the command line
14 年之前
Dave Smith
b063d3b8df
Fix bug 438; add support for listing available templates
14 年之前
Tuncer Ayaz
dfb5af4049
Add forward-compatible escript_foldl function
escript:foldl/3 was undocumented and has been replaced with
better APIs post-R13B04. The new exported funs are officially
documented.
15 年之前
Dave Smith
28d3b75641
Fix bug in templater where escript was not found in subdirs were specified in rebar.config; minor formatting cleanups
15 年之前
Bryan Fink
f6feac493d
provide separate 'file' and 'template' directives, instead of one 'file' directive with a boolean Render flag
15 年之前
Bryan Fink
60629e8516
add chmod template directive for changing file file permission
usage: {chmod, Mode, File}
where: Mode is an integer, as specified by the 'mode' field of the file_info record
(see docs for file:write_file_info/2)
15 年之前
Bryan Fink
4c2dade0f4
add Render flag to 'file' template directive
{file,In,Out,true} = render with mustache
{file,In,Out,false} = do not render with mustache (leave as-is)
old-form {file,In,Out} is equivalent to {file,In,Out,true}
15 年之前
Bryan Fink
4e01b32d5d
look for templates in local directory as well
15 年之前
Dave Smith
47e70f308a
Add support for forcibly overwriting output files; courtesy of OJ Reeves
15 年之前
Dave Smith
ec4e805898
Adding sketch of functionality for creating a reltool node from template
15 年之前
Dave Smith
8c4f35a294
Basic implementation of templater is complete
15 年之前
Dave Smith
2d9af6cf48
Sketching out templating system
15 年之前
Dave Smith
a46be8cec1
Use new rebar_config API to avoid having to actually delete/change the config any
15 年之前
Tuncer Ayaz
9a8015f2d7
Added vi modeline/emacs local variables to file headers
15 年之前
Dave Smith
2f64f0e6b2
Refactoring core logic in preparation for dependency mgmt; breaking out sub_dir determination into dedicated module
15 年之前
Dave Smith
a01e7dcd30
Adding first crack at reltool support
15 年之前
Dave Smith
b7e2088c27
Initial commit
15 年之前