Class: Epuber::ThirdParty::Bower

Inherits:
Object
  • Object
show all
Defined in:
lib/epuber/third_party/bower.rb

Constant Summary collapse

JS_COMPONENTS =
{
  jquery: 'jquery/dist/',
  cookies: 'cookies-js/dist/',
  uri: 'uri.js/src/',
  spin: 'spin.js/',
  keymaster: 'keymaster/',
}.freeze

Class Method Summary collapse

Class Method Details

.path_to_js(component) ⇒ Object



15
16
17
18
19
20
# File 'lib/epuber/third_party/bower.rb', line 15

def path_to_js(component)
  path = JS_COMPONENTS[component]
  raise "Not found component #{component}" if path.nil?

  File.expand_path("bower/bower_components/#{path}", File.dirname(__FILE__))
end