Skip to content

Commit

Permalink
fix($build): exclude dest folder from pageFiles (close: #654) (#655)
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrodim authored and ulivz committed Jul 27, 2018
1 parent 2ad9cb6 commit c1fe692
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/prepare/resolveOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,13 @@ module.exports = async function resolveOptions (sourceDir) {
const markdown = createMarkdown(siteConfig)

// resolve pageFiles
const pageFiles = sort(await globby(['**/*.md', '!.vuepress', '!node_modules'], { cwd: sourceDir }))
const files = ['**/*.md', '!.vuepress', '!node_modules']
if (siteConfig.dest) {
// exclude dest folder from pageFiles
const outDirRelative = path.relative(sourceDir, outDir)
files.push('!' + outDirRelative)
}
const pageFiles = sort(await globby(files, { cwd: sourceDir }))

// resolve lastUpdated
const shouldResolveLastUpdated = (
Expand Down

0 comments on commit c1fe692

Please sign in to comment.