Sha256: 58419ff5a13664ef2e691a5205e5f12f6e38b5a4a2a4fbc186225950abc1a9e5

Contents?: true

Size: 239 Bytes

Versions: 28

Compression:

Stored size: 239 Bytes

Contents

module Sinatra::AssetPack
  class UglifyEngine < Engine
    def js(str, options={})
      require 'uglifier'
      Uglifier.compile str, options
    rescue => e
      nil
    end
  end

  Compressor.register :js, :uglify, UglifyEngine
end

Version data entries

28 entries across 28 versions & 3 rubygems

Version Path
sinatra-assetpack-0.1.2 lib/sinatra/assetpack/engines/uglify.rb
sinatra-assetpack-0.1.1 lib/sinatra/assetpack/engines/uglify.rb
sinatra-assetpack-0.1.0 lib/sinatra/assetpack/engines/uglify.rb
sinatra-assetpack-flexible-compression-0.0.1 lib/sinatra/assetpack/engines/uglify.rb
sundawg-sinatra-assetpack-fork-0.0.12.pre1 lib/sinatra/assetpack/engines/uglify.rb
sinatra-assetpack-0.0.12.pre1 lib/sinatra/assetpack/engines/uglify.rb
sinatra-assetpack-0.0.11 lib/sinatra/assetpack/engines/uglify.rb
sinatra-assetpack-0.0.10 lib/sinatra/assetpack/engines/uglify.rb