mirror of
https://github.com/wahyd4/vuepress.git
synced 2026-08-24 20:55:51 +10:00
1. Support scope package and shortcut like plugin. 2. Support relative path for 'layout' and 'notFound' option.
18 lines
579 B
JavaScript
18 lines
579 B
JavaScript
const { fs, logger } = require('@vuepress/shared-utils')
|
|
const prepare = require('@vuepress/core/lib/prepare')
|
|
const { docsModes } = require('./meta')
|
|
|
|
async function prepareForTest () {
|
|
await Promise.all(docsModes.map(async ({ docsPath, docsTempPath }) => {
|
|
await fs.ensureDir(docsTempPath)
|
|
await prepare(docsPath, { theme: '@vuepress/default', temp: docsTempPath })
|
|
}))
|
|
}
|
|
|
|
module.exports = function globalSetup () {
|
|
logger.wait('Start preparing for testing ...')
|
|
return prepareForTest().then(() => {
|
|
logger.wait('Finished preparing for testing ...')
|
|
})
|
|
}
|