Skip to content

Commit 46638e4

Browse files
committed
Revert "feat: expose config.styl variables to style.styl (#727)"
This reverts commit 0bc2b51.
1 parent 6d8f813 commit 46638e4

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

docs/default-theme-config/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,6 @@ $textColor = red
476476

477477
``` stylus
478478
// .vuepress/style.styl, your extra styles.
479-
// variables from config.styl can be used here
480479
#my-style {}
481480
```
482481

lib/prepare/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,9 @@ module.exports = async function prepare (sourceDir) {
2828
const hasUserOverride = fs.existsSync(overridePath)
2929
await writeTemp('override.styl', hasUserOverride ? `@import(${JSON.stringify(overridePath)})` : ``)
3030

31-
const configPath = require.resolve('../default-theme/styles/config.styl')
3231
const stylePath = path.resolve(sourceDir, '.vuepress/style.styl').replace(/[\\]+/g, '/')
3332
const hasUserStyle = fs.existsSync(stylePath)
34-
await writeTemp('style.styl', hasUserStyle ? `@import(${JSON.stringify(configPath)})\n@import(${JSON.stringify(stylePath)})` : ``)
33+
await writeTemp('style.styl', hasUserStyle ? `@import(${JSON.stringify(stylePath)})` : ``)
3534

3635
// Temporary tip, will be removed at next release.
3736
if (hasUserOverride && !hasUserStyle) {

0 commit comments

Comments
 (0)