Method: Uglifier.compile_with_map

Defined in:
lib/uglifier.rb

.compile_with_map(source, options = {}) ⇒ Array(String, String)

Minifies JavaScript code and generates a source map using implicit context.

Parameters:

  • source (IO, String)

    valid JS source code.

  • options (Hash) (defaults to: {})

    optional overrides to Uglifier::DEFAULTS

Returns:

  • (Array(String, String))

    minified code and source map.



139
140
141
# File 'lib/uglifier.rb', line 139

def self.compile_with_map(source, options = {})
  new(options).compile_with_map(source)
end