Commit graph

23 commits

Author SHA1 Message Date
Serge Aleynikov
38902e9a52 Specify multiple locations of DTL template files
Added a backward compartible feature to specify `erlydtl_opts' options
for the DTL template compiler to allow inclusion of templates in different
directories with different compilation settings for each. 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.
2012-10-22 08:39:44 +04:00
Tuncer Ayaz
491d52298e Re-use rebar_utils:ebin_dir() 2012-08-06 19:00:18 +02:00
Tuncer Ayaz
636c02f0be Fix R13B03 build (Reported-by: Sergey Nartimov) 2012-07-28 19:51:57 +02:00
Dave Smith
c86c99940d Remove ?FAIL in favor of ?ABORT 2012-06-08 07:06:15 -06:00
Tuncer Ayaz
b6fadef5d3 Fix whitespace errors 2012-03-18 18:51:08 +01:00
Loïc Hoguin
2c37270f52 Fix badarg crashes on missing dependency errors 2012-03-18 18:46:04 +01:00
Phil Toland
8b486055e4 Fix compiling DTL templates with latest erlydtl
The latest version of erlydtl requires that custom tag modules be in
the path when templates are compiled. Without this change rebar silently
exits when using the custom_tags_modules option.
2012-02-16 11:40:57 +01:00
Tuncer Ayaz
2cae2950c4 Fix whitespace errors 2012-01-17 17:04:07 +01:00
Tuncer Ayaz
e6caab00d5 Use ?ERROR where appropriate 2012-01-17 17:04:07 +01:00
Tuncer Ayaz
63de05d914 Clean up code 2011-02-06 17:41:04 +01:00
Tuncer Ayaz
c466076ffb Clean up emacs file local variables 2011-01-31 17:55:36 +01:00
Tuncer Ayaz
ebcae06928 Fix grep invocations 2011-01-13 17:39:14 +01:00
Tuncer Ayaz
e4036cbe56 Apply Tidier suggestions 2011-01-13 17:39:14 +01:00
Tuncer Ayaz
58fd80917a Fix file existence checks 2011-01-13 17:39:14 +01:00
Juhani Rankimies
52ca7795fe Unify executable invocation
Add flags to rebar_utils:sh to control output and error handling.
Replace calls to os:cmd with calls to rebar_utils:sh.
2011-01-06 15:02:19 +01:00
Anthony Ramine
9ecc3455bf Fix typo in rebar_erlydtl_compiler 2010-12-16 15:40:15 +01:00
Kostis Sagonas
7dc76d578e Tidier improvements 2010-10-26 00:38:51 +02:00
Alex Songe
73ee6e442b Added support for custom_tags_dir compile option to rebar_erlydtl_compiler 2010-01-16 13:58:34 -06:00
Bryan Fink
abd535d081 rework elrydtl_compiler to do dependency checking correctly in refactored rebar 2010-01-04 11:24:28 -05:00
Dave Smith
fa2a58261a Another round of refactoring to yield better flexiblity in the base_compiler system 2010-01-03 22:53:04 -07:00
Dave Smith
9c15d63191 Refactor of compilation logic to enable support for package modules and provide better modularity/reusability for other systems 2010-01-02 14:17:59 -07:00
Tuncer Ayaz
9a8015f2d7 Added vi modeline/emacs local variables to file headers 2009-12-31 19:42:53 +01:00
Bryan Fink
299f45623f rebar can now compile ErlyDTL files (if erlydtl is installed)
defaults to compiling from templates/*.dtl to ebin/*_dtl.beam
see top of rebar_erlydtl_compiler for configuration options
2009-12-22 09:57:42 -05:00