Class: BrowserifyRails::BrowserifyProcessor
- Inherits:
-
Tilt::Template
- Object
- Tilt::Template
- BrowserifyRails::BrowserifyProcessor
- Defined in:
- lib/browserify-rails/browserify_processor.rb
Instance Method Summary collapse
Instance Method Details
#evaluate(context, locals, &block) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/browserify-rails/browserify_processor.rb', line 12 def evaluate(context, locals, &block) # If there's nothing to do, we just return the data we received return data unless should_browserify? # Signal dependencies to sprockets to ensure we track changes evaluate_dependencies(context.environment.paths).each do |path| context.depend_on(path) end run_browserify(context.logical_path) end |
#prepare ⇒ Object
7 8 9 10 |
# File 'lib/browserify-rails/browserify_processor.rb', line 7 def prepare ensure_tmp_dir_exists! ensure_commands_exist! end |