-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: proper minimum node version warning
- Loading branch information
Showing
3 changed files
with
22 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
const fs = require('fs-extra') | ||
const path = require('path') | ||
const chalk = require('chalk') | ||
|
||
module.exports = async (dir) => { | ||
const source = path.resolve(__dirname, 'default-theme') | ||
const target = path.resolve(dir, '.vuepress/theme') | ||
await fs.copy(source, target) | ||
// remove the import to default theme override | ||
const styleConfig = path.resolve(target, 'styles/config.styl') | ||
const content = await fs.readFile(styleConfig, 'utf-8') | ||
const transformed = content.split('\n').slice(0, -2).join('\n') | ||
await fs.writeFile(styleConfig, transformed) | ||
console.log(`Copied default theme into ${chalk.cyan(target)}.`) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
exports.dev = require('./dev') | ||
exports.build = require('./build') | ||
exports.eject = require('./eject') | ||
Object.assign(exports, require('./util')) |