Class: Bower

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby-bower/ruby-bower.rb

Class Method Summary collapse

Class Method Details

.backendObject



6
7
8
9
10
11
12
# File 'lib/ruby-bower/ruby-bower.rb', line 6

def backend
  @@backend ||= ExecJS::ExternalRuntime.new(
    :name        => 'Node.js (V8) (customized for module loading)',
    :command     => ["nodejs", "node"],
    :runner_path => File.expand_path("../support/node_event_emitter_runner.js", __FILE__)
  )
end

.commandsObject



20
21
22
# File 'lib/ruby-bower/ruby-bower.rb', line 20

def commands
  [:list]
end

.contextObject



14
15
16
17
18
# File 'lib/ruby-bower/ruby-bower.rb', line 14

def context
  @context ||= backend.compile <<-JS
var bower = require('bower');
JS
end