Skip to content

Commit

Permalink
refactor: naming and comments (#655)
Browse files Browse the repository at this point in the history
  • Loading branch information
ulivz committed Jul 27, 2018
1 parent c1fe692 commit ab38982
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions lib/prepare/resolveOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,16 @@ module.exports = async function resolveOptions (sourceDir) {
const markdown = createMarkdown(siteConfig)

// resolve pageFiles
const files = ['**/*.md', '!.vuepress', '!node_modules']
const patterns = ['**/*.md', '!.vuepress', '!node_modules']
if (siteConfig.dest) {
// exclude dest folder from pageFiles
// #654 exclude dest folder when dest dir was set in
// sourceDir but not in '.vuepress'
const outDirRelative = path.relative(sourceDir, outDir)
files.push('!' + outDirRelative)
if (!outDirRelative.includes('..')) {
patterns.push('!' + outDirRelative)
}
}
const pageFiles = sort(await globby(files, { cwd: sourceDir }))
const pageFiles = sort(await globby(patterns, { cwd: sourceDir }))

// resolve lastUpdated
const shouldResolveLastUpdated = (
Expand Down

0 comments on commit ab38982

Please sign in to comment.