erlydtl.erl 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. %%%-------------------------------------------------------------------
  2. %%% File: erlydtl.erl
  3. %%% @author Roberto Saccon <rsaccon@gmail.com> [http://rsaccon.com]
  4. %%% @author Evan Miller <emmiller@gmail.com>
  5. %%% @copyright 2008 Roberto Saccon, Evan Miller
  6. %%% @doc
  7. %%% Public interface for ErlyDTL
  8. %%% @end
  9. %%%
  10. %%% The MIT License
  11. %%%
  12. %%% Copyright (c) 2008 Roberto Saccon, Evan Miller
  13. %%%
  14. %%% Permission is hereby granted, free of charge, to any person obtaining a copy
  15. %%% of this software and associated documentation files (the "Software"), to deal
  16. %%% in the Software without restriction, including without limitation the rights
  17. %%% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  18. %%% copies of the Software, and to permit persons to whom the Software is
  19. %%% furnished to do so, subject to the following conditions:
  20. %%%
  21. %%% The above copyright notice and this permission notice shall be included in
  22. %%% all copies or substantial portions of the Software.
  23. %%%
  24. %%% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  25. %%% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  26. %%% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  27. %%% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  28. %%% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  29. %%% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  30. %%% THE SOFTWARE.
  31. %%%
  32. %%% @since 2007-11-11 by Roberto Saccon, Evan Miller
  33. %%%-------------------------------------------------------------------
  34. -module(erlydtl).
  35. -author('rsaccon@gmail.com').
  36. -author('emmiller@gmail.com').
  37. %% API
  38. -export([compile/2, compile/3]).
  39. -export([compile_dir/2, compile_dir/3]).
  40. %% @spec compile( FileOrBinary, Module::atom() ) -> ok | {error, Reason}
  41. compile(FileOrBinary, Module) ->
  42. erlydtl_compiler:compile(FileOrBinary, Module).
  43. %% @spec compile( FileOrBinary, Module::atom(), Options ) -> ok | {error, Reason}
  44. compile(FileOrBinary, Module, Options) ->
  45. erlydtl_compiler:compile(FileOrBinary, Module, Options).
  46. %% @spec compile_dir( DirectoryPath::string(), Module::atom() ) -> ok | {error, Reason}
  47. compile_dir(DirectoryPath, Module) ->
  48. erlydtl_compiler:compile_dir(DirectoryPath, Module).
  49. %% @spec compile_dir( DirectoryPath::string(), Module::atom(), Options ) -> ok | {error, Reason}
  50. compile_dir(DirectoryPath, Module, Options) ->
  51. erlydtl_compiler:compile_dir(DirectoryPath, Module, Options).