basho/rebar — pull request #322 by saleyn (2012-10-16 22:55:37+00:00)
Title: Add ability to specify multiple locations of DTL template files.

The change is backward compatible. The new way of specifying options
includes an ability to define lists of options in the `erlydtl_opts'
section, e.g.:

{erlydtl_opts, [
[{doc_root, "src/view"}, {module_ext, "_dtl_vw"}]
, [{doc_root, "src"}, {module_ext, ""}, {recursive, false}]

, {out_dir, "ebin"}
, {compiler_options, [verbose, debug_info]}
]}.

The definition above is identical to this (the last two options
are duplicated in each list):

{erlydtl_opts, [
[{doc_root, "src/view"}
,{module_ext, "_dtl_vw"}
,{out_dir, "ebin"}
,{compiler_options, [verbose, debug_info]}]

, [{doc_root, "src"}
,{module_ext, ""}
,{out_dir, "ebin"}
,{compiler_options, [verbose, debug_info]}
,{recursive, false}]
]}.

In this case "src/view" and "src" directories containing template files
will be compiled. A new `recursive' option tells rebar_erlydtl_compiler
to search files recursively from a given doc_root. In the example above
the "src" directory won't be scanned recursively, and the target template
name for target beam modules won't have "_dtl_vw" suffix.