Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async beforeParse (cli) {
const pkg = require('@vuepress/core/package.json')
checkEnv(pkg)
registerCoreCommands(cli, OPTIONS)
await handleUnknownCommand(cli, OPTIONS)
cli.version(pkg.version).help()
},
exports.bootstrap = function ({
plugins,
theme
} = {}) {
const { path, logger, env } = require('@vuepress/shared-utils')
const { dev, build, eject } = require('@vuepress/core')
cli
.version(pkg.version)
.help()
cli
.command('dev [targetDir]', 'start development server')
.option('-p, --port ', 'use specified port (default: 8080)')
.option('-t, --temp ', 'set the directory of the temporary file')
.option('-c, --cache [cache]', 'set the directory of cache')
.option('--host ', 'use specified host (default: 0.0.0.0)')
.option('--no-cache', 'clean the cache before build')
.option('--debug', 'start development server in debug mode')
.option('--silent', 'start development server in silent mode')
.action((sourceDir = '.', options) => {
const {
host,
port,
debug,