mirror of https://github.com/curbengh/hexo-yam
style: tab to space
This commit is contained in:
parent
ce973f940f
commit
ad5f82712c
|
@ -16,9 +16,9 @@ function logicHtml (str, data) {
|
|||
let path = data.path
|
||||
let exclude = options.exclude
|
||||
|
||||
// Return if a path matches exclusion pattern
|
||||
// Return if a path matches exclusion pattern
|
||||
if (path && exclude && exclude.length) {
|
||||
if (nanomatch.some(path, exclude, { matchBase: true })) return str
|
||||
if (nanomatch.some(path, exclude, { matchBase: true })) return str
|
||||
}
|
||||
|
||||
let result = Htmlminifier(str, options)
|
||||
|
@ -39,9 +39,9 @@ function logicCss (str, data) {
|
|||
let path = data.path
|
||||
let exclude = options.exclude
|
||||
|
||||
// Return if a path matches exclusion pattern
|
||||
// Return if a path matches exclusion pattern
|
||||
if (path && exclude && exclude.length) {
|
||||
if (nanomatch.some(path, exclude, { matchBase: true })) return str
|
||||
if (nanomatch.some(path, exclude, { matchBase: true })) return str
|
||||
}
|
||||
|
||||
return new Promise(function (resolve, reject) {
|
||||
|
@ -66,13 +66,13 @@ function logicJs (str, data) {
|
|||
let path = data.path
|
||||
let exclude = options.exclude
|
||||
|
||||
// Return if a path matches exclusion pattern
|
||||
// Return if a path matches exclusion pattern
|
||||
if (path && exclude && exclude.length) {
|
||||
if (nanomatch.some(path, exclude, { matchBase: true })) return str
|
||||
if (nanomatch.some(path, exclude, { matchBase: true })) return str
|
||||
}
|
||||
|
||||
// Terser doesn't like unsupported options
|
||||
const jsOptions = Object.assign({}, options)
|
||||
const jsOptions = Object.assign({}, options)
|
||||
delete jsOptions.enable
|
||||
delete jsOptions.exclude
|
||||
delete jsOptions.logger
|
||||
|
@ -96,9 +96,9 @@ function logicGzip () {
|
|||
let routeList = route.list()
|
||||
|
||||
return Promise.all(routeList.filter(path => (path.endsWith('.html') || path.endsWith('.js') || path.endsWith('.css')
|
||||
|| path.endsWith('.xml') || path.endsWith('.json') || path.endsWith('.txt')
|
||||
|| path.endsWith('.ttf') || path.endsWith('.atom') || path.endsWith('.stl')
|
||||
|| path.endsWith('.svg') || path.endsWith('.eot'))).map(path => {
|
||||
|| path.endsWith('.xml') || path.endsWith('.json') || path.endsWith('.txt')
|
||||
|| path.endsWith('.ttf') || path.endsWith('.atom') || path.endsWith('.stl')
|
||||
|| path.endsWith('.svg') || path.endsWith('.eot'))).map(path => {
|
||||
return new Promise((resolve, reject) => {
|
||||
// Grab all assets using hexo router
|
||||
let assetPath = route.get(path)
|
||||
|
@ -139,9 +139,9 @@ function logicBrotli () {
|
|||
let routeList = route.list()
|
||||
|
||||
return Promise.all(routeList.filter(path => (path.endsWith('.html') || path.endsWith('.js') || path.endsWith('.css')
|
||||
|| path.endsWith('.xml') || path.endsWith('.json') || path.endsWith('.txt')
|
||||
|| path.endsWith('.ttf') || path.endsWith('.atom') || path.endsWith('.stl')
|
||||
|| path.endsWith('.svg') || path.endsWith('.eot'))).map(path => {
|
||||
|| path.endsWith('.xml') || path.endsWith('.json') || path.endsWith('.txt')
|
||||
|| path.endsWith('.ttf') || path.endsWith('.atom') || path.endsWith('.stl')
|
||||
|| path.endsWith('.svg') || path.endsWith('.eot'))).map(path => {
|
||||
return new Promise((resolve, reject) => {
|
||||
// Grab all assets using hexo router
|
||||
let assetPath = route.get(path)
|
||||
|
|
Loading…
Reference in New Issue