Module: Guard::Templates::Compilers
- Defined in:
- lib/guard/compilers.rb
Class Method Summary collapse
Class Method Details
.compile_jade(str) ⇒ Object
6 7 8 9 10 |
# File 'lib/guard/compilers.rb', line 6 def self.compile_jade(str) jade = File.read(File.join(Pathname.new(__FILE__).dirname.to_s, '../engines/jade.js')) ExecJS.compile("window = {}; #{jade}").eval("window.jade.compile(#{str.dump}, {client:true, compileDebug:false}).toString()") end |