Skip to content

Commit

Permalink
fix: normalize override file path in windows (#692) (close: #642)
Browse files Browse the repository at this point in the history
  • Loading branch information
jingzhe authored and ulivz committed Aug 1, 2018
1 parent 88b65cc commit 9537c2c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/prepare/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ module.exports = async function prepare (sourceDir) {
await writeTemp('siteData.js', dataCode)

// 4. handle user override
const overridePath = path.resolve(sourceDir, '.vuepress/override.styl')
const overridePath = path.resolve(sourceDir, '.vuepress/override.styl').replace(/[\\]+/g, '/')
const hasUserOverride = fs.existsSync(overridePath)
await writeTemp('override.styl', hasUserOverride ? `@import(${JSON.stringify(overridePath)})` : ``)

const stylePath = path.resolve(sourceDir, '.vuepress/style.styl')
const stylePath = path.resolve(sourceDir, '.vuepress/style.styl').replace(/[\\]+/g, '/')
const hasUserStyle = fs.existsSync(stylePath)
await writeTemp('style.styl', hasUserStyle ? `@import(${JSON.stringify(stylePath)})` : ``)

Expand Down

0 comments on commit 9537c2c

Please sign in to comment.