middleman-minify-html 3.3.0 → 3.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/features/minify.feature +10 -0
- data/lib/middleman-minify-html/extension.rb +16 -0
- data/lib/middleman-minify-html/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5df4c0a7461850bbd06d73d35d9a9e786967c2fd
|
4
|
+
data.tar.gz: 200af04b0d2195989f0cf7b5443d3637b20655d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5997da6a701907aa9ad7f7ef82855a1261059c8071eb5c6eb1dec98379fcd1432fd2e1ae52c8e58ee36f27ed0a9e6065e7186deb3e563cbac1264bdf4a11c411
|
7
|
+
data.tar.gz: 221f487913eb299c0a60763b8d9c4249cc348177730b8aff01013e16c9251c32ed5133c7c4ed9ce335723ee0d8ac720ebeeb1fc85a9122c158f2494d45183422
|
data/features/minify.feature
CHANGED
@@ -22,6 +22,16 @@ Feature: Minify HTML
|
|
22
22
|
echo "bar";
|
23
23
|
?>
|
24
24
|
"""
|
25
|
+
|
26
|
+
Scenario: Preview HTML with minify_html enabled and custom option
|
27
|
+
Given a fixture app "basic-app"
|
28
|
+
And a file named "config.rb" with:
|
29
|
+
"""
|
30
|
+
activate :minify_html, :preserve_line_breaks => true
|
31
|
+
"""
|
32
|
+
And the Server is running at "basic-app"
|
33
|
+
When I go to "/index.html"
|
34
|
+
Then I should see "13" lines
|
25
35
|
|
26
36
|
Scenario: Build HTML with minify_html disabled
|
27
37
|
Given a fixture app "basic-app"
|
@@ -1,5 +1,21 @@
|
|
1
1
|
module Middleman
|
2
2
|
class MinifyHtmlExtension < Extension
|
3
|
+
option :remove_multi_spaces, true, 'Remove multiple spaces'
|
4
|
+
option :remove_comments, true, 'Remove comments'
|
5
|
+
option :remove_intertag_spaces, false, 'Remove inter-tag spaces'
|
6
|
+
option :remove_quotes, true, 'Remove quotes'
|
7
|
+
option :simple_doctype, false, 'Use simple doctype'
|
8
|
+
option :remove_script_attributes, true, 'Remove script attributes'
|
9
|
+
option :remove_style_attributes, true, 'Remove style attributes'
|
10
|
+
option :remove_link_attributes, true, 'Remove link attributes'
|
11
|
+
option :remove_form_attributes, false, 'Remove form attributes'
|
12
|
+
option :remove_input_attributes, true, 'Remove input attributes'
|
13
|
+
option :remove_javascript_protocol, true, 'Remove JS protocol'
|
14
|
+
option :remove_http_protocol, true, 'Remove HTTP protocol'
|
15
|
+
option :remove_https_protocol, false, 'Remove HTTPS protocol'
|
16
|
+
option :preserve_line_breaks, false, 'Preserve line breaks'
|
17
|
+
option :simple_boolean_attributes, true, 'Use simple boolean attributes'
|
18
|
+
|
3
19
|
def initialize(*)
|
4
20
|
super
|
5
21
|
require 'htmlcompressor'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: middleman-minify-html
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas Reynolds
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: middleman-core
|