mirror of https://github.com/curbengh/hexo-yam
fix: fixed css minify
This commit is contained in:
parent
0bf55ab474
commit
c2ec422680
|
@ -13,11 +13,11 @@ async function minifyCss(str, data) {
|
|||
|
||||
const path = data.path
|
||||
const { exclude, globOptions, verbose } = options
|
||||
options.returnPromise = true
|
||||
|
||||
if (isMatch(path, exclude, globOptions)) return str
|
||||
|
||||
try {
|
||||
console.log(path)
|
||||
const styles = await new CleanCSS(options).minify(str).styles
|
||||
if (verbose) logFn.call(this, str, styles, path, 'css')
|
||||
return styles
|
||||
|
@ -36,7 +36,6 @@ function minifyCssWithMap() {
|
|||
/** @type {{ exclude: string[] }} */
|
||||
const { exclude, globOptions, verbose } = options
|
||||
const include = ['*.css', ...exclude.map(x => `!${x}`)]
|
||||
options.returnPromise = true
|
||||
const cleanCSS = new CleanCSS(options)
|
||||
|
||||
return Promise.all((match(routeList, include, globOptions)).map(path => {
|
||||
|
|
Loading…
Reference in New Issue