Skip to content

Commit

Permalink
fix: always write override.style
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Apr 23, 2018
1 parent 10a4013 commit 9861deb
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib/prepare.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,9 @@ if (!Object.assign) Object.assign = require('object-assign')`
await writeTemp('polyfill.js', polyfillCode)

// 5. handle user override
if (options.useDefaultTheme) {
const overridePath = path.resolve(sourceDir, '.vuepress/override.styl')
const hasUserOverride = fs.existsSync(overridePath)
await writeTemp(`override.styl`, hasUserOverride ? `@import(${JSON.stringify(overridePath)})` : ``)
}
const overridePath = path.resolve(sourceDir, '.vuepress/override.styl')
const hasUserOverride = options.useDefaultTheme && fs.existsSync(overridePath)
await writeTemp(`override.styl`, hasUserOverride ? `@import(${JSON.stringify(overridePath)})` : ``)

async function writeEnhanceTemp (destName, srcPath, isEnhanceExist) {
await writeTemp(
Expand Down

0 comments on commit 9861deb

Please sign in to comment.