mirror of https://github.com/curbengh/hexo-yam
feat: upgrade minify xml to v4
This commit is contained in:
parent
bda758177a
commit
a36d5ef2df
|
@ -1,8 +1,9 @@
|
|||
'use strict'
|
||||
const { minify: compressXml } = require('minify-xml')
|
||||
const { match, logFn } = require('./tools')
|
||||
|
||||
function minifyXml() {
|
||||
async function minifyXml() {
|
||||
const { minify: compressXml } = await import('minify-xml')
|
||||
|
||||
const hexo = this
|
||||
const options = hexo.config.minify.xml
|
||||
|
||||
|
@ -11,7 +12,7 @@ function minifyXml() {
|
|||
const routeList = route.list()
|
||||
const { globOptions, include, verbose } = options
|
||||
|
||||
return Promise.all((match(routeList, include, globOptions)).map(path => {
|
||||
await Promise.all((match(routeList, include, globOptions)).map(path => {
|
||||
return new Promise((/** @type {(value: void) => void} */ resolve, reject) => {
|
||||
const assetPath = route.get(path)
|
||||
let assetTxt = ''
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
"clean-css": "^5.1.2",
|
||||
"html-minifier-terser": "^7.2.0",
|
||||
"micromatch": "^4.0.2",
|
||||
"minify-xml": "^3.2.0",
|
||||
"minify-xml": "^4.5.2",
|
||||
"svgo": "^3.0.0",
|
||||
"terser": "^5.3.0"
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue