Class: BrowserifyRails::BrowserifyProcessor

Inherits:
Tilt::Template
  • Object
show all
Defined in:
lib/browserify-rails/browserify_processor.rb

Constant Summary collapse

BROWSERIFY_CMD =
"./node_modules/.bin/browserify".freeze

Instance Method Summary collapse

Instance Method Details

#evaluate(context, locals, &block) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
# File 'lib/browserify-rails/browserify_processor.rb', line 11

def evaluate(context, locals, &block)
  if commonjs_module?
    asset_dependencies(context.environment.paths).each do |path|
      context.depend_on(path)
    end

    browserify
  else
    data
  end
end

#prepareObject



8
9
# File 'lib/browserify-rails/browserify_processor.rb', line 8

def prepare
end