use sprockets vendored gems
This commit is contained in:
parent
b1e99d46c6
commit
860e411435
@ -28,4 +28,5 @@ Gem::Specification.new do |gem|
|
|||||||
gem.add_runtime_dependency 'rack'
|
gem.add_runtime_dependency 'rack'
|
||||||
gem.add_runtime_dependency 'sprockets'
|
gem.add_runtime_dependency 'sprockets'
|
||||||
gem.add_runtime_dependency 'coffee-script'
|
gem.add_runtime_dependency 'coffee-script'
|
||||||
|
gem.add_runtime_dependency 'sprockets-vendor_gems'
|
||||||
end
|
end
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
require 'sprockets'
|
require 'sprockets'
|
||||||
require 'sprockets/engines'
|
require 'sprockets/engines'
|
||||||
require 'forwardable'
|
require 'forwardable'
|
||||||
|
require 'sprockets-vendor_gems'
|
||||||
|
|
||||||
module Flowerbox::Delivery
|
module Flowerbox::Delivery
|
||||||
class SprocketsHandler
|
class SprocketsHandler
|
||||||
@ -8,7 +9,7 @@ module Flowerbox::Delivery
|
|||||||
|
|
||||||
attr_reader :files, :options
|
attr_reader :files, :options
|
||||||
|
|
||||||
def_delegators :environment, :append_path
|
def_delegators :environment, :append_path, :register_engine
|
||||||
|
|
||||||
def initialize(options)
|
def initialize(options)
|
||||||
@options = options
|
@options = options
|
||||||
@ -27,7 +28,7 @@ module Flowerbox::Delivery
|
|||||||
def environment
|
def environment
|
||||||
return @environment if @environment
|
return @environment if @environment
|
||||||
|
|
||||||
@environment = Sprockets::Environment.new
|
@environment = Sprockets::EnvironmentWithVendoredGems.new
|
||||||
@environment.unregister_postprocessor('application/javascript', Sprockets::SafetyColons)
|
@environment.unregister_postprocessor('application/javascript', Sprockets::SafetyColons)
|
||||||
@environment.register_postprocessor('application/javascript', Flowerbox::Delivery::Tilt::EnsureSavedFile)
|
@environment.register_postprocessor('application/javascript', Flowerbox::Delivery::Tilt::EnsureSavedFile)
|
||||||
@environment.unregister_bundle_processor('text/css', Sprockets::CharsetNormalizer)
|
@environment.unregister_bundle_processor('text/css', Sprockets::CharsetNormalizer)
|
||||||
|
Loading…
Reference in New Issue
Block a user