Commands
Through this chapter, you can learn about the built-in commands of Rspress and how to use them.
rspress dev
The rspress dev
command is used to start a local development server, providing a development environment for document preview and debugging.
Usage: rspress dev [root] [options]
Options:
root specify the root directory of the project, which is `docs` in current directory by default, Optional
-c --config <config> specify config file path, which can be a relative path or an absolute path
--port <port> specify port number
--host <host> specify host
-h, --help show command help
rspress build
The rspress build
command is used to build documentation site for production.
Usage: rspress build [root] [options]
Options:
root specify the root directory of the project, which is `docs` in current directory by default, Optional
-c --config <config> specify config file path, which can be a relative path or an absolute path
-h, --help show command help
rspress preview
The rspress preview
command is used to preview the output files of the rspress build
command locally.
Usage: rspress preview [root] [options]
Options:
root specify the root directory of the project, which is `docs` in current directory by default, Optional
-c --config <config> specify config file path, which can be a relative path or an absolute path
--port <port> specify port number
--host <host> specify host
-h, --help show command help
rspress update
rspress update
command is used to update the relevant package about rspress to latest version.