html-minifier
Advanced tools
Comparing version 3.4.4 to 3.5.0
{ | ||
"name": "html-minifier", | ||
"description": "Highly configurable, well-tested, JavaScript-based HTML minifier.", | ||
"version": "3.4.4", | ||
"version": "3.5.0", | ||
"keywords": [ | ||
@@ -58,3 +58,3 @@ "cli", | ||
"camel-case": "3.0.x", | ||
"clean-css": "4.0.x", | ||
"clean-css": "4.1.x", | ||
"commander": "2.9.x", | ||
@@ -65,3 +65,3 @@ "he": "1.1.x", | ||
"relateurl": "0.2.x", | ||
"uglify-js": "~2.8.22" | ||
"uglify-js": "3.0.x" | ||
}, | ||
@@ -71,7 +71,6 @@ "devDependencies": { | ||
"grunt-browserify": "5.0.x", | ||
"grunt-contrib-uglify": "2.3.x", | ||
"grunt-contrib-uglify": "3.0.x", | ||
"gruntify-eslint": "3.1.x", | ||
"phantomjs-prebuilt": "2.1.x", | ||
"qunitjs": "2.x", | ||
"uglify-to-browserify": "1.0.x" | ||
"qunitjs": "2.x" | ||
}, | ||
@@ -78,0 +77,0 @@ "benchmarkDependencies": { |
@@ -26,13 +26,13 @@ # HTMLMinifier | ||
| [Google](https://www.google.com/) | 44 | **42** | 45 | 46 | 45 | | ||
| [HTMLMinifier](https://github.com/kangax/html-minifier) | 125 | **98** | 106 | 110 | 106 | | ||
| [CNN](http://www.cnn.com/) | 135 | **124** | 132 | 133 | 128 | | ||
| [Amazon](http://www.amazon.co.uk/) | 193 | **161** | 184 | 187 | n/a | | ||
| [New York Times](http://www.nytimes.com/) | 204 | **135** | 152 | 152 | 143 | | ||
| [Stack Overflow](http://stackoverflow.com/) | 224 | **173** | 182 | 190 | 179 | | ||
| [BBC](http://www.bbc.co.uk/) | 225 | **186** | 219 | 225 | 213 | | ||
| [HTMLMinifier](https://github.com/kangax/html-minifier) | 126 | **98** | 106 | 110 | 106 | | ||
| [CNN](http://www.cnn.com/) | 133 | **122** | 131 | 132 | 126 | | ||
| [Amazon](http://www.amazon.co.uk/) | 196 | **164** | 187 | 190 | n/a | | ||
| [New York Times](http://www.nytimes.com/) | 210 | **141** | 158 | 158 | 148 | | ||
| [Stack Overflow](http://stackoverflow.com/) | 218 | **168** | 176 | 184 | 174 | | ||
| [BBC](http://www.bbc.co.uk/) | 240 | **196** | 232 | 239 | 227 | | ||
| [Bootstrap CSS](http://getbootstrap.com/css/) | 272 | **260** | 269 | 229 | 269 | | ||
| [Wikipedia](https://en.wikipedia.org/wiki/President_of_the_United_States) | 549 | **502** | 530 | 548 | 529 | | ||
| [NBC](http://www.nbc.com/) | 634 | **603** | 632 | 634 | n/a | | ||
| [NBC](http://www.nbc.com/) | 644 | **612** | 642 | 645 | n/a | | ||
| [Eloquent Javascript](http://eloquentjavascript.net/1st_edition/print.html) | 870 | **815** | 840 | 864 | n/a | | ||
| [ES6 table](http://kangax.github.io/compat-table/es6/) | 4380 | **3695** | 4130 | n/a | n/a | | ||
| [ES6 table](http://kangax.github.io/compat-table/es6/) | 4381 | **3696** | 4131 | n/a | n/a | | ||
| [ES6 draft](https://tc39.github.io/ecma262/) | 5506 | **4913** | 5060 | n/a | n/a | | ||
@@ -39,0 +39,0 @@ |
@@ -679,3 +679,2 @@ 'use strict'; | ||
} | ||
minifyJS.fromString = true; | ||
(minifyJS.parse || (minifyJS.parse = {})).bare_returns = false; | ||
@@ -685,14 +684,9 @@ options.minifyJS = function(text, inline) { | ||
var code = start ? text.slice(start[0].length).replace(/\n\s*-->\s*$/, '') : text; | ||
try { | ||
minifyJS.parse.bare_returns = inline; | ||
code = UglifyJS.minify(code, minifyJS).code; | ||
if (/;$/.test(code)) { | ||
code = code.slice(0, -1); | ||
} | ||
return code; | ||
} | ||
catch (err) { | ||
options.log(err); | ||
minifyJS.parse.bare_returns = inline; | ||
var result = UglifyJS.minify(code, minifyJS); | ||
if (result.error) { | ||
options.log(result.error); | ||
return text; | ||
} | ||
return result.code.replace(/;$/, ''); | ||
}; | ||
@@ -699,0 +693,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6
88051
2020
+ Addedclean-css@4.1.11(transitive)
+ Addedcommander@2.11.0(transitive)
+ Addeduglify-js@3.0.28(transitive)
- Removedalign-text@0.1.4(transitive)
- Removedcamelcase@1.2.1(transitive)
- Removedcenter-align@0.1.3(transitive)
- Removedclean-css@4.0.13(transitive)
- Removedcliui@2.1.0(transitive)
- Removeddecamelize@1.2.0(transitive)
- Removedis-buffer@1.1.6(transitive)
- Removedkind-of@3.2.2(transitive)
- Removedlazy-cache@1.0.4(transitive)
- Removedlongest@1.0.1(transitive)
- Removedrepeat-string@1.6.1(transitive)
- Removedright-align@0.1.3(transitive)
- Removeduglify-js@2.8.29(transitive)
- Removeduglify-to-browserify@1.0.2(transitive)
- Removedwindow-size@0.1.0(transitive)
- Removedwordwrap@0.0.2(transitive)
- Removedyargs@3.10.0(transitive)
Updatedclean-css@4.1.x
Updateduglify-js@3.0.x