refactor: small improvements (#4194)

This commit is contained in:
Alexander Lichter 2018-10-25 11:57:52 +01:00 committed by Pooya Parsa
parent a3ba6e96ca
commit 48393b33c7
2 changed files with 5 additions and 4 deletions

View File

@ -29,7 +29,8 @@ import {
relativeTo,
waitFor,
determineGlobals,
stripWhitespace
stripWhitespace,
isString
} from '@nuxt/common'
const glob = pify(Glob)
@ -372,7 +373,7 @@ export default class Builder {
custom: customFileExists
}
})
.filter(i => !!i)
.filter(Boolean)
// -- Custom templates --
// Add custom template files
@ -524,7 +525,7 @@ export default class Builder {
watchServer() {
const nuxtRestartWatch = concat(
this.options.serverMiddleware
.filter(i => typeof i === 'string')
.filter(isString)
.map(this.nuxt.resolver.resolveAlias),
this.options.watch.map(this.nuxt.resolver.resolveAlias),
path.join(this.options.rootDir, 'nuxt.config.js')

View File

@ -99,7 +99,7 @@ export default class PostcssConfig {
const instance = plugin(opts)
return instance
})
.filter(e => e)
.filter(Boolean)
}
}