1
0
Fork 0
mirror of https://github.com/middleman/middleman.git synced 2022-11-09 12:20:27 -05:00

Add LD-JSON to MinifyJavascript content types allowed to be compressed (#2138)

As LD-JSON spec is basically a JSON in a <script> tag, the uglifier can compress them as a normal javascript.
This commit is contained in:
Eduardo Rolim 2018-01-18 15:36:07 -02:00 committed by Thomas Reynolds
parent 0936519ab9
commit 15fe7fb3d9

View file

@ -10,7 +10,7 @@ class Middleman::Extensions::MinifyJavascript < ::Middleman::Extension
require 'uglifier'
::Uglifier.new
}, 'Set the JS compressor to use.'
option :content_types, %w(application/javascript), 'Content types of resources that contain JS'
option :content_types, %w(application/javascript application/ld+json), 'Content types of resources that contain JS'
option :inline_content_types, %w(text/html text/php), 'Content types of resources that contain inline JS'
def ready