From 9861debe018d002f15a318a03da1c79f19408f51 Mon Sep 17 00:00:00 2001 From: Evan You Date: Mon, 23 Apr 2018 18:54:20 -0400 Subject: [PATCH] fix: always write override.style --- lib/prepare.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/prepare.js b/lib/prepare.js index a2a4c16708..2d0fc56db2 100644 --- a/lib/prepare.js +++ b/lib/prepare.js @@ -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(