refactor: use basename instead of matchBase

This commit is contained in:
curbengh 2019-08-06 11:23:58 +09:30
parent 7d06de7e79
commit 43a316d149
No known key found for this signature in database
GPG Key ID: 21EA847C35D6E034
1 changed files with 6 additions and 6 deletions

View File

@ -17,7 +17,7 @@ if (hexo.config.neat_enable === true) {
removeStyleLinkTypeAttributes: true, removeStyleLinkTypeAttributes: true,
minifyJS: true, minifyJS: true,
minifyCSS: true, minifyCSS: true,
globOptions: { matchBase: true } globOptions: { basename: true }
}, hexo.config.neat_html) }, hexo.config.neat_html)
// CSS minifier // CSS minifier
@ -26,7 +26,7 @@ if (hexo.config.neat_enable === true) {
logger: false, logger: false,
exclude: ['*.min.css'], exclude: ['*.min.css'],
level: 2, level: 2,
globOptions: { matchBase: true } globOptions: { basename: true }
}, hexo.config.neat_css) }, hexo.config.neat_css)
// Javascript minifier // Javascript minifier
@ -37,7 +37,7 @@ if (hexo.config.neat_enable === true) {
compress: {}, compress: {},
mangle: true, mangle: true,
output: {}, output: {},
globOptions: { matchBase: true } globOptions: { basename: true }
}, hexo.config.neat_js) }, hexo.config.neat_js)
// SVG minifier // SVG minifier
@ -46,7 +46,7 @@ if (hexo.config.neat_enable === true) {
logger: false, logger: false,
include: ['*.svg', '!*.min.svg'], include: ['*.svg', '!*.min.svg'],
plugins: [], plugins: [],
globOptions: { matchBase: true } globOptions: { basename: true }
}, hexo.config.neat_svg) }, hexo.config.neat_svg)
// gzip compression // gzip compression
@ -54,7 +54,7 @@ if (hexo.config.neat_enable === true) {
enable: true, enable: true,
logger: false, logger: false,
include: ['*.html', '*.css', '*.js', '*.txt', '*.ttf', '*.atom', '*.stl', '*.xml', '*.svg', '*.eot', '*.json'], include: ['*.html', '*.css', '*.js', '*.txt', '*.ttf', '*.atom', '*.stl', '*.xml', '*.svg', '*.eot', '*.json'],
globOptions: { matchBase: true } globOptions: { basename: true }
}, hexo.config.neat_gzip) }, hexo.config.neat_gzip)
// brotli compression // brotli compression
@ -62,7 +62,7 @@ if (hexo.config.neat_enable === true) {
enable: true, enable: true,
logger: false, logger: false,
include: ['*.html', '*.css', '*.js', '*.txt', '*.ttf', '*.atom', '*.stl', '*.xml', '*.svg', '*.eot', '*.json'], include: ['*.html', '*.css', '*.js', '*.txt', '*.ttf', '*.atom', '*.stl', '*.xml', '*.svg', '*.eot', '*.json'],
globOptions: { matchBase: true } globOptions: { basename: true }
}, hexo.config.neat_brotli) }, hexo.config.neat_brotli)
const filter = require('./lib/filter') const filter = require('./lib/filter')