lib/linner/template.rb in linner-0.11.2 vs lib/linner/template.rb in linner-0.11.3

- old
+ new

@@ -12,20 +12,10 @@ class JavascriptTemplate < PlainTemplate self.default_mime_type = "application/javascript" end - class BabelTemplate < PlainTemplate - self.default_mime_type = "application/javascript" - - def prepare; end - - def evaluate(scope, locals, &block) - @output ||= Babel::Transpiler.transform(data, compact: false)["code"] - end - end - class CSSTemplate < PlainTemplate self.default_mime_type = "text/css" end class CompassSassTemplate < SassTemplate @@ -59,9 +49,11 @@ @output ||= Handlebars.precompile(data) end end ERBTemplate.default_mime_type = "application/x-eruby" + + BabelTemplate.default_mime_type = "application/javascript" register PlainTemplate, "txt" register CSSTemplate, "css" register JavascriptTemplate, "js" register YAMLTemplate, "yml", "yaml"