Apply level 2 optimisation of clean-css

https://github.com/jakubpawlowicz/clean-css#level-2-optimizations
This commit is contained in:
weyusi 2018-10-19 12:34:34 +10:30
parent 0c304a576a
commit 8a8c5563c4
3 changed files with 3 additions and 3 deletions

View File

@ -51,7 +51,7 @@ function logic_css(str, data) {
}
return new Promise(function (resolve, reject) {
new CleanCSS(options).minify(str, function (err, result) {
new CleanCSS({level:2}).minify(str, function (err, result) {
if (err) return reject(err);
var saved = ((str.length - result.styles.length) / str.length * 100).toFixed(2);
resolve(result.styles);

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "hexo-yam",
"version": "0.6.0",
"version": "0.6.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,7 +1,7 @@
{
"name": "hexo-yam",
"description": "Yet Another Minifier. Minify and compress html, js and css",
"version": "0.6.0",
"version": "0.6.1",
"readme": "README.md",
"main": "index.js",
"directories": {