refactor: replace nanomatch with micromatch

https://github.com/hexojs/hexo/pull/3538
This commit is contained in:
curben 2019-07-30 15:54:06 +09:30
parent 03001eaabf
commit 007ece5fae
1 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
'use strict' 'use strict'
const nanomatch = require('nanomatch') const micromatch = require('micromatch')
const template = require('./template') const template = require('./template')
const moment = require('moment') const moment = require('moment')
@ -59,7 +59,7 @@ module.exports = function (locals) {
function isMatch (path, patterns) { function isMatch (path, patterns) {
if (patterns && patterns.length) { if (patterns && patterns.length) {
if (nanomatch.some(path, patterns, { matchBase: true })) return true if (micromatch.isMatch(path, patterns, { matchBase: true })) return true
} }
return false return false