Class: Stitch::CoffeeScriptCompiler

Inherits:
Compiler
  • Object
show all
Defined in:
lib/stitch/compilers/coffeescript.rb

Instance Method Summary collapse

Methods inherited from Compiler

all, all_extensions, compile, compilers, enabled, enabled?, extensions, for_extension, inherited, source, source?

Instance Method Details

#compile(path) ⇒ Object



14
15
16
17
# File 'lib/stitch/compilers/coffeescript.rb', line 14

def compile(path)
  source = File.read(path)
  CoffeeScript.compile(source, :filename => path.to_s)
end