Permalink
Browse files

monster commit: integrated Evan's changes (much improved everything)

  • Loading branch information...
1 parent 5f58d17 commit 873b0eff6bb8395b0cfeb89f537a66b3cf9d4816 @rsaccon rsaccon committed Jan 11, 2008
@@ -1,13 +0,0 @@
-preset-base-barstring
-
-base-barstring
-
-base template
-
-replacing the base title
-
-more of base template
-
-replacing the base content - variable: test-barstring after variable
-
-end of base template
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>Test variable</title>
- </head>
- <body>
- foostring1
- preset-var1
- foostring2
- preset-var2
- </body>
-</html>
@@ -51,7 +51,8 @@ compile_all() ->
true,
fun(Path, _Acc) ->
Module = filename:rootname(filename:basename(Path)),
- case erlydtl_server:compile(Path, DocRoot, Module, {?MODULE, preset}) of
+ % case erlydtl_server:compile(Path, DocRoot, Module, {?MODULE, preset}) of
+ case erlydtl_compiler:compile(Path, DocRoot, Module) of
ok ->
io:format("compile success: ~p~n",[Module]);
_ ->
@@ -111,7 +112,8 @@ compile(Name, Ext) ->
DocRoot = filename:join([filename:dirname(code:which(?MODULE)),"..", "demo", "templates"]),
Module = "test_" ++ Name,
Path = filename:join([DocRoot, Module ++ Ext]),
- case erlydtl_server:compile(Path, DocRoot, Module, {?MODULE, preset}) of
+ % case erlydtl_server:compile(Path, DocRoot, Module, {?MODULE, preset}) of
+ case erlydtl_compiler:compile(Path, DocRoot, Module) of
ok ->
io:format("compile success: ~p~n",[Module]);
_ ->
@@ -235,7 +237,9 @@ render2(OutDir, Module, Ext, Arg) ->
io:format("TRACE ~p:~p Errors: ~p~n",[?MODULE, ?LINE, Err]),
io:format("TRACE ~p:~p Warnings: ~p~n",[?MODULE, ?LINE, Warnings]);
{'EXIT', Reason} ->
- io:format("TRACE ~p:~p ~p: render failure: ~n",[?MODULE, ?LINE, Reason])
+ io:format("TRACE ~p:~p ~p: render failure: ~n",[?MODULE, ?LINE, Reason]);
+ Val -> %% only temporarly
+ write_file(OutDir, Module, Ext, Val, [])
end.
@@ -247,7 +251,9 @@ render2(OutDir, Module, Ext) ->
io:format("TRACE ~p:~p Errors: ~p~n",[?MODULE, ?LINE, Err]),
io:format("TRACE ~p:~p Warnings: ~p~n",[?MODULE, ?LINE, Warnings]);
{'EXIT', Reason} ->
- io:format("TRACE ~p:~p ~p: render failure: ~n",[?MODULE, ?LINE, Reason])
+ io:format("TRACE ~p:~p ~p: render failure: ~n",[?MODULE, ?LINE, Reason]);
+ Val -> %% only temporarly
+ write_file(OutDir, Module, Ext, Val, [])
end.
@@ -1,21 +0,0 @@
-{application, erlydtl,
- [{description, "ErlyDTL Server"},
- {vsn, "0.1"},
- {modules, [
- erlydtl,
- erlydtl_server,
- erlydtl_app,
- erlydtl_sup,
- erlydtl_deps,
- erlydtl_parser,
- erlydtl_scanner,
- erlydtl_tools
- ]},
- {registered, []},
- {applications, [
- kernel,
- stdlib
- ]},
- {included_applications, []},
- {env, []},
- {mod, {erlydtl_app, []}}]}.
@@ -1,15 +1,16 @@
%%%-------------------------------------------------------------------
%%% File: erlydtl.erl
%%% @author Roberto Saccon <rsaccon@gmail.com> [http://rsaccon.com]
-%%% @copyright 2007 Roberto Saccon
+%%% @author Evan Miller <emmiller@gmail.com>
+%%% @copyright 2008 Roberto Saccon, Evan Miller
%%% @doc
%%% Helper module to start and stop ErlyDTL application and for
%%% creating yecc-grammar based template parser
%%% @end
%%%
%%% The MIT License
%%%
-%%% Copyright (c) 2007 Roberto Saccon
+%%% Copyright (c) 2008 Roberto Saccon, Evan Miller
%%%
%%% Permission is hereby granted, free of charge, to any person obtaining a copy
%%% of this software and associated documentation files (the "Software"), to deal
@@ -29,10 +30,11 @@
%%% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
%%% THE SOFTWARE.
%%%
-%%% @since 2007-11-17 by Roberto Saccon
+%%% @since 2007-11-11 by Roberto Saccon, Evan Miller
%%%-------------------------------------------------------------------
-module(erlydtl).
-author('rsaccon@gmail.com').
+-author('emmiller@gmail.com').
%% API
-export([start/0, stop/0, create_parser/0, reload/2, write_beam/3]).
@@ -1,14 +1,15 @@
%%%-------------------------------------------------------------------
%%% File: erlydtl_app.erl
%%% @author Roberto Saccon <rsaccon@gmail.com> [http://rsaccon.com]
-%%% @copyright 2007 Roberto Saccon
+%%% @author Evan Miller <emmiller@gmail.com>
+%%% @copyright 2008 Roberto Saccon, Evan Miller
%%% @doc
%%%
%%% @end
%%%
%%% The MIT License
%%%
-%%% Copyright (c) 2007 Roberto Saccon
+%%% Copyright (c) 2007 Roberto Saccon, Evan Miller
%%%
%%% Permission is hereby granted, free of charge, to any person obtaining a copy
%%% of this software and associated documentation files (the "Software"), to deal
@@ -28,10 +29,11 @@
%%% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
%%% THE SOFTWARE.
%%%
-%%% @since 2007-12-15 by Roberto Saccon
+%%% @since 2007-12-15 by Roberto Saccon, Evan Miller
%%%-------------------------------------------------------------------
-module(erlydtl_app).
-author('rsaccon@gmail.com').
+-author('emmiller@gmail.com').
-behaviour(application).
@@ -1,14 +1,15 @@
%%%-------------------------------------------------------------------
%%% File: erlydtl_base.erl
%%% @author Roberto Saccon <rsaccon@gmail.com> [http://rsaccon.com]
-%%% @copyright 2007 Roberto Saccon
+%%% @author Evan Miller <emmiller@gmail.com>
+%%% @copyright 2008 Roberto Saccon, Evan Miller
%%% @doc
%%% ErlyDTL AST tools (tree builder and parse transformations)
%%% @end
%%%
%%% The MIT License
%%%
-%%% Copyright (c) 2007 Roberto Saccon
+%%% Copyright (c) 2007 Roberto Saccon, Evan Miller
%%%
%%% Permission is hereby granted, free of charge, to any person obtaining a copy
%%% of this software and associated documentation files (the "Software"), to deal
@@ -28,10 +29,11 @@
%%% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
%%% THE SOFTWARE.
%%%
-%%% @since 2007-11-17 by Roberto Saccon
+%%% @since 2007-11-17 by Roberto Saccon, Evan Miller
%%%-------------------------------------------------------------------
-module(erlydtl_base).
-author('rsaccon@gmail.com').
+-author('emmiller@gmail.com').
-record(dtl, {
buffer = [],
Oops, something went wrong.

0 comments on commit 873b0ef

Please sign in to comment.