Class: Barber::Ember::Precompiler

Inherits:
Precompiler show all
Defined in:
lib/barber/ember/precompiler.rb

Instance Method Summary collapse

Methods inherited from Precompiler

compile, #compile, compiler_version, #handlebars, #precompile_function

Instance Method Details

#compiler_versionObject



17
18
19
20
21
22
23
24
25
# File 'lib/barber/ember/precompiler.rb', line 17

def compiler_version
  cache_key = "ember-source:#{::Ember::VERSION}"

  if handlebars_version
    "handlebars:#{handlebars_version}/#{cache_key}"
  else
    cache_key
  end
end

#ember_template_precompilerObject



5
6
7
# File 'lib/barber/ember/precompiler.rb', line 5

def ember_template_precompiler
  @ember ||= File.new(::Ember::Source.bundled_path_for("ember-template-compiler.js"))
end

#precompilerObject



9
10
11
# File 'lib/barber/ember/precompiler.rb', line 9

def precompiler
  @precompiler = File.new(File.expand_path("../../javascripts/ember_precompiler.js", __FILE__))
end

#sourcesObject



13
14
15
# File 'lib/barber/ember/precompiler.rb', line 13

def sources
  super + [ember_template_precompiler]
end