Skip to content

Commit

Permalink
fix($core): fix windows output path issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ulivz committed Oct 7, 2018
1 parent 0ed90d2 commit d89f766
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/@vuepress/core/lib/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module.exports = async function build (sourceDir, cliOptions = {}) {
return console.error(logger.error(chalk.red('Unexpected option: outDir cannot be set to the current working directory.\n'), false))
}
await fs.remove(outDir)
logger.debug('Dist directory: ' + chalk.gray(path.resolve(process.cwd(), outDir)))
logger.debug('Dist directory: ' + chalk.gray(require('path').resolve(process.cwd(), outDir)))

let clientConfig = createClientConfig(options, cliOptions).toConfig()
let serverConfig = createServerConfig(options, cliOptions).toConfig()
Expand Down
4 changes: 2 additions & 2 deletions packages/@vuepress/core/lib/prepare/AppContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ module.exports = class AppContext {
this.base = this.siteConfig.base || '/'
this.themeConfig = this.siteConfig.themeConfig || {}
this.outDir = this.siteConfig.dest
? path.resolve(process.cwd(), this.siteConfig.dest)
: path.resolve(sourceDir, '.vuepress/dist')
? require('path').resolve(process.cwd(), this.siteConfig.dest)
: require('path').resolve(sourceDir, '.vuepress/dist')

this.pluginAPI = new PluginAPI(this)
this.pages = [] // Array<Page>
Expand Down

0 comments on commit d89f766

Please sign in to comment.