Skip to content

Commit

Permalink
WiP: CLI docs
Browse files Browse the repository at this point in the history
  • Loading branch information
wgao19 committed May 17, 2019
1 parent 5685e8a commit 1deee26
Showing 1 changed file with 52 additions and 3 deletions.
55 changes: 52 additions & 3 deletions website/docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,57 @@ id: cli
title: CLI
---

TODO: Add CLI reference here.
Docusaurus provides a set of scripts to help you generate, serve, and deploy your website.

#### References
Once your website is generated, your website package will contain the Docusaurus scripts that you may invoke with your package manager:

```json
// package.json
{
// ...
"scripts": {
"start": "docusaurus start",
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy"
}
}
```

## Docusaurus CLI commands

Below is a list of Docusaurus CLI commands and their usages:

### `docusaurus init`

The `docusaurus init` command is intended to be used with `docusaurus` installed globally:

```shell
$ yarn global add docusaurus
# or
$ npm install --global docusaurus
```

<!-- TODO: init docs after the init command is implemented -->

### `docusaurus start`

Builds and serves the static site with [Webpack Dev Server](https://webpack.js.org/configuration/dev-server).

**options**

|Options|Default|Description|
|-|-|-|
|`--port`|`3000`|Specifies the port of the dev server|
|`--host`|`localhost`|Specifie a host to use. E.g., if you want your server to be accessible externally, you can use `--host 0.0.0.0`|
|`--no-watch`|`false`|<!-- TODO verify how this works --> Disables watching files for hot reload|
|`--hot-only`|`false`|Enables Hot Module Replacement without page refresh as fallback in case of build failures. More information [here](https://webpack.js.org/configuration/dev-server/#devserverhotonly).|

### `docusaurus build`

### `docusaurus swizzle`

### `docusaurus deploy`

## References

- TODO

0 comments on commit 1deee26

Please sign in to comment.