Skip to main content

Project Command

Less than 1 minuteCookbookTutorialGet StartedProject Command

This tutorial introduces VuePress project commands.

Common Commands

  • vuepress dev [dir] will start a development server to allow you to develop your VuePress site locally.
  • vuepress build [dir] will build your VuePress site into static files for your subsequent deployment.

Using Template

If you are using the VuePress Theme Hope template, you can find the following three commands in package.json:

{
  "scripts": {
    "docs:build": "vuepress build src",
    "docs:clean-dev": "vuepress dev src --clean-cache",
    "docs:dev": "vuepress dev src"
  }
}

This means you can use:

pnpm
  • pnpm docs:dev starts the development server
  • pnpm docs:build builds the project and outputs
  • pnpm docs:clean-dev to clear cache and start development server

Terminate DevServer

To terminate the development server, please click on the terminal and press Ctrl + C twice.

Update Version

If you need to upgrade your theme and VuePress version, execute the following command:

pnpm
pnpm dlx vp-update