refactor(cssFilter): replace micromatch with String.endsWith()

This commit is contained in:
curben 2019-08-26 13:55:45 +09:30
parent 8292e31140
commit 4b77924e2d
No known key found for this signature in database
GPG Key ID: 5D9DB57A25D34EE3
1 changed files with 1 additions and 2 deletions

View File

@ -10,13 +10,12 @@
*/
const autoprefixer = require('autoprefixer')
const micromatch = require('micromatch')
const normalize = require('postcss-normalize')
const postcss = require('postcss')
hexo.extend.renderer.register('css', 'css', (data, options) => {
if (data.path) {
if (micromatch.isMatch(data.path, '*.min.css', { basename: true })) return data.text
if (data.path.endsWith('.min.css')) return data.text
}
return new Promise((resolve, reject) => {