Class: Middleman::Extensions::MinifyJavascript

Inherits:
Middleman::Extension show all
Defined in:
middleman-core/lib/middleman-core/extensions/minify_javascript.rb

Overview

Minify Javascript Extension

Defined Under Namespace

Classes: Rack

Constant Summary

Constant Summary

Constants included from Contracts

Contracts::PATH_MATCHER, Contracts::ResourceList

Instance Attribute Summary

Attributes inherited from Middleman::Extension

#app, #options

Instance Method Summary (collapse)

Methods inherited from Middleman::Extension

activated_extension, #after_build, #after_extension_activated, after_extension_activated, #before_build, #before_configuration, clear_after_extension_callbacks, config, helpers, #initialize, option

Methods included from Contracts

#Contract

Constructor Details

This class inherits a constructor from Middleman::Extension

Instance Method Details

- (Object) after_configuration



12
13
14
15
16
17
# File 'middleman-core/lib/middleman-core/extensions/minify_javascript.rb', line 12

def after_configuration
  # Setup Rack middleware to minify CSS
  app.use Rack, compressor: options[:compressor],
                ignore: Array(options[:ignore]) + [/\.min\./],
                inline: options[:inline]
end