Created
February 25, 2015 17:18
-
-
Save elia/e330d92d8b826d089c4f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'opal' | |
Opal::BuilderProcessors.class_eval do | |
class SprocketsProcessor < self::JsProcessor | |
def self.match?(*) | |
true | |
end | |
def source | |
compiled.to_s + mark_as_required(@filename) | |
end | |
def requires | |
compiled.send(:required_assets).map(&:logical_path) | |
end | |
private | |
def compiled | |
@compiled ||= Rails.application.assets[@filename] | |
end | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment