Sha256: ca97f1d79b0ea9a07f54d015c08f1f2af0381a11f84e7a8bc889548f8c7238b5

Contents?: true

Size: 443 Bytes

Versions: 24

Compression:

Stored size: 443 Bytes

Contents

# frozen_string_literal: true

require 'rails/railtie'

class Terser
  # Railtie for Rails
  class Railtie < ::Rails::Railtie
    initializer :terser, :group => :all do |_|
      if config.respond_to?(:assets) # to make sure the sprockets pipeline is active
        config.assets.configure do |env|
          env.register_compressor 'application/javascript', :terser, Terser::Compressor
        end
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 2 rubygems

Version Path
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.3.0/gems/terser-1.2.4/lib/terser/railtie.rb
terser-1.2.5 lib/terser/railtie.rb
terser-1.2.4 lib/terser/railtie.rb
terser-1.2.3 lib/terser/railtie.rb
terser-1.2.2 lib/terser/railtie.rb
terser-1.2.1 lib/terser/railtie.rb
terser-1.2.0 lib/terser/railtie.rb
terser-1.1.20 lib/terser/railtie.rb
terser-1.1.19 lib/terser/railtie.rb
terser-1.1.18 lib/terser/railtie.rb
terser-1.1.17 lib/terser/railtie.rb
terser-1.1.16 lib/terser/railtie.rb
terser-1.1.15 lib/terser/railtie.rb
terser-1.1.14 lib/terser/railtie.rb
terser-1.1.13 lib/terser/railtie.rb
terser-1.1.12 lib/terser/railtie.rb
terser-1.1.11 lib/terser/railtie.rb
terser-1.1.10 lib/terser/railtie.rb
terser-1.1.9 lib/terser/railtie.rb
terser-1.1.8 lib/terser/railtie.rb