Sha256: b2ed9a0038c1cde1c000e4d29e84eb31fa8a182f7acd52aa8185f81bd0de8358

Contents?: true

Size: 661 Bytes

Versions: 19

Compression:

Stored size: 661 Bytes

Contents

require 'sprockets'
require 'opal/sprockets/processor'
require 'opal/sprockets/erb'

module Opal
  # @deprecated
  def self.process asset
    Environment.new[asset].to_s
  end

  # @deprecated
  class Environment < ::Sprockets::Environment
    def initialize *args
      warn "WARNING: Opal::Sprockets::Environment is deprecated. "\
           "Please use Opal::Server directly or append Opal.paths to the environment manually."
      super
      append_opal_paths
    end

    def use_gem gem_name
      Opal.use_gem gem_name
      append_opal_paths
    end

    private

    def append_opal_paths
      Opal.paths.each { |p| append_path p }
    end
  end
end

Version data entries

19 entries across 19 versions & 2 rubygems

Version Path
opal-0.9.4 lib/opal/sprockets/environment.rb
opal-0.9.3 lib/opal/sprockets/environment.rb
opal-0.9.2 lib/opal/sprockets/environment.rb
opal-0.9.0 lib/opal/sprockets/environment.rb
opal-0.9.0.rc1 lib/opal/sprockets/environment.rb
opal-0.9.0.beta2 lib/opal/sprockets/environment.rb
opal-0.9.0.beta1 lib/opal/sprockets/environment.rb
opal-0.8.1 lib/opal/sprockets/environment.rb
opal-0.8.1.rc1 lib/opal/sprockets/environment.rb
opal-wedge-0.9.0.dev lib/opal/sprockets/environment.rb
opal-0.8.0 lib/opal/sprockets/environment.rb
opal-0.8.0.rc3 lib/opal/sprockets/environment.rb
opal-0.8.0.rc2 lib/opal/sprockets/environment.rb
opal-0.8.0.rc1 lib/opal/sprockets/environment.rb
opal-0.8.0.beta1 lib/opal/sprockets/environment.rb
opal-0.7.2 lib/opal/sprockets/environment.rb
opal-0.7.1 lib/opal/sprockets/environment.rb
opal-0.7.0 lib/opal/sprockets/environment.rb
opal-0.7.0.rc1 lib/opal/sprockets/environment.rb