mirror of
https://github.com/wahyd4/vuepress.git
synced 2026-08-09 05:16:23 +10:00
feat($core): emit warning if the source directory doesn't exist (close: #1521)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user