Skip to content

Commit

Permalink
Add support for both diet cache and diet live mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
schveiguy committed Oct 26, 2019
1 parent 9708046 commit f377b17
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions source/diet/html.d
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ template compileHTMLDietFile(string filename, ALIASES...)
alias compileHTMLDietFile = compileHTMLDietFileString!(filename, contents, ALIASES);
}

version(DietUseCache) version(DietUseLive) static assert("Cached compilation + Live Mode not supported");

version(DietUseLive)
private string[] _getHTMLStrings(TRAITS...)(string filename, string expectedCode) @safe
{
Expand Down Expand Up @@ -149,11 +147,11 @@ template compileHTMLDietFileString(string filename, alias contents, ALIASES...)



alias TRAITS = DietTraits!ALIASES;
static if (_diet_use_cache && is(typeof(import(_diet_cache_file_name)))) {
pragma(msg, "Using cached Diet HTML template "~filename~"...");
enum _dietParser = import(_diet_cache_file_name);
} else {
alias TRAITS = DietTraits!ALIASES;
pragma(msg, "Compiling Diet HTML template "~filename~"...");
private Document _diet_nodes() { return applyTraits!TRAITS(parseDiet!(translate!TRAITS)(_diet_files)); }
version(DietUseLive)
Expand Down

0 comments on commit f377b17

Please sign in to comment.