   """
   def compile(files, root) when is_list(files) do
     files
-    |> Enum.map(&(compile(&1, root)))
+    |> Enum.map(&(compile(&1, root, pre_compile_templates)))
   end
-  def compile(file, root) when is_binary(file) do
+  def compile(file, root, _pre_compile = false) when is_binary(file) do
+    file_match = Path.relative_to(file, root)
+    quote do
+      def render_template(unquote(file_match), assigns) do
+        EEx.eval_file(unquote(file), assigns: assigns)
+      end
+    end
+  end
+  def compile(file, root, _pre_compile = true) when is_binary(file) do
+    file_match = Path.relative_to(file, root)
     quoted = EEx.compile_file(file)
-    file_match = Path.relative_to(file, root)
     quote do
       def render_template(unquote(file_match), var!(assigns)) do
         unquote(quoted)

      Returns the template root alongside all template filenames.
      """
      def __templates__ do
        {unquote(template_root), unquote(template_files)}
      end

      unquote(templates)
    end
  end


  defmacro __using__(_opts) do
    quote do
      import Trot.Template

      @template_root Path.relative_to_cwd("templates")

      @before_compile Trot.Template
    end
  end

  defmacro __before_compile__(env) do
    template_root = Module.get_attribute(env.module, :template_root)
    template_files = Trot.Template.find_all(template_root)
    templates = Trot.Template.compile(template_files, template_root)

