Skip to content

Commit

Permalink
feat($core): emit warning if the source directory doesn't exist (close:
Browse files Browse the repository at this point in the history
  • Loading branch information
ulivz committed Apr 6, 2019
1 parent 74887c5 commit 6da9a5f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/@vuepress/core/lib/node/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ module.exports = class App {
this.options = options
this.sourceDir = this.options.sourceDir || path.join(__dirname, 'docs.fallback')
logger.debug('sourceDir', this.sourceDir)
if (!fs.existsSync(this.sourceDir)) {
logger.warn(`Source directory doesn't exist: ${chalk.yellow(this.sourceDir)}`)
}

const { tempPath, writeTemp } = createTemp(options.temp)
this.tempPath = tempPath
Expand Down

0 comments on commit 6da9a5f

Please sign in to comment.