mirror of
https://github.com/wahyd4/vuepress.git
synced 2026-08-09 05:16:23 +10:00
- fix($core): markdown slot doesn‘t work. (regression of c85f62d)
- docs: fresh Node.JS API.
- test: official plugins.
33 lines
754 B
JavaScript
33 lines
754 B
JavaScript
const minimist = require('minimist')
|
|
const { createJestRunner } = require('@vuepress/test-utils')
|
|
const { createApp } = require('@vuepress/core')
|
|
|
|
const rawArgs = process.argv.slice(2)
|
|
const args = minimist(rawArgs)
|
|
|
|
let regex
|
|
if (args.p) {
|
|
const packages = (args.p || args.package).split(',').join('|')
|
|
regex = `.*@vuepress/(${packages}|plugin-(${packages}))/.*\\.spec\\.js$`
|
|
const i = rawArgs.indexOf('-p')
|
|
rawArgs.splice(i, 2)
|
|
}
|
|
|
|
const jestRunner = createJestRunner([
|
|
'--config', 'scripts/jest.config.js',
|
|
'--runInBand',
|
|
...(regex ? [regex] : [])
|
|
])
|
|
|
|
// ensure the basic temp files were genereatod
|
|
createApp({
|
|
temp: '.temp'
|
|
})
|
|
.process()
|
|
.then(() => jestRunner())
|
|
.catch(err => {
|
|
console.error(err)
|
|
process.exit(1)
|
|
})
|
|
|