refactor: remove object-assign ponyfill

Object.assign() is supported by node 4 and up
This commit is contained in:
weyusi 2018-10-27 18:38:12 +10:30
parent c3a10de6ee
commit 0946ab2f7b
2 changed files with 5 additions and 8 deletions

View File

@ -1,9 +1,7 @@
/* global hexo */
const assign = require('object-assign')
if (hexo.config.neat_enable === true) {
// HTML minifier
hexo.config.neat_html = assign({
hexo.config.neat_html = Object.assign({
enable: true,
logger: false,
exclude: [],
@ -18,14 +16,14 @@ if (hexo.config.neat_enable === true) {
}, hexo.config.neat_html)
// Css minifier
hexo.config.neat_css = assign({
hexo.config.neat_css = Object.assign({
enable: true,
logger: false,
exclude: ['*.min.css']
}, hexo.config.neat_css)
// Js minifier
hexo.config.neat_js = assign({
hexo.config.neat_js = Object.assign({
enable: true,
mangle: true,
logger: false,
@ -35,13 +33,13 @@ if (hexo.config.neat_enable === true) {
}, hexo.config.neat_js)
// html, css, js compression
hexo.config.neat_gzip = assign({
hexo.config.neat_gzip = Object.assign({
enable: true,
logger: false
}, hexo.config.neat_gzip)
// html, css, js compression
hexo.config.neat_brotli = assign({
hexo.config.neat_brotli = Object.assign({
enable: true,
logger: false
}, hexo.config.neat_brotli)

View File

@ -23,7 +23,6 @@
"html-minifier": "^3.5.20",
"iltorb": "^2.4.0",
"minimatch": "^3.0.4",
"object-assign": "^4.1.1",
"uglify-js": "^3.4.9"
},
"keywords": [