Sha256: 925c3ccd34e249a84cfc645d153af958943cef87506c382d534e195fc4c31ff7
Contents?: true
Size: 278 Bytes
Versions: 2
Compression:
Stored size: 278 Bytes
Contents
module Stitch class MustacheCompiler < Compiler extensions :mustache def compile(path) content = File.read(path) %{var template = #{content.to_json}; module.exports = (function(view){ return Mustache.to_html(template, view); });} end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
stitch-rb-0.0.7 | lib/stitch/compilers/mustache.rb |
stitch-rb-0.0.6 | lib/stitch/compilers/mustache.rb |