Update more docs
This commit is contained in:
13 files changed
+26
-26
No files matched your search
@@ -5,11 +5,11 @@ In this chapter we will introduce all `dioxus-cli` commands.
|
||||
> You can also use `dx --help` to get cli help info.
|
||||
|
||||
```
|
||||
dioxus
|
||||
dx
|
||||
Build, bundle, & ship your Dioxus app
|
||||
|
||||
USAGE:
|
||||
dioxus [OPTIONS] <SUBCOMMAND>
|
||||
dx [OPTIONS] <SUBCOMMAND>
|
||||
|
||||
OPTIONS:
|
||||
-h, --help Print help information
|
||||
|
||||
@@ -7,12 +7,12 @@ dioxus-clean
|
||||
Clean build artifacts
|
||||
|
||||
USAGE:
|
||||
dioxus clean
|
||||
dx clean
|
||||
```
|
||||
|
||||
# Example
|
||||
|
||||
```
|
||||
dioxus clean
|
||||
dx clean
|
||||
```
|
||||
|
||||
@@ -7,7 +7,7 @@ dioxus-serve
|
||||
Build, watch & serve the Rust WASM app and all of its assets
|
||||
|
||||
USAGE:
|
||||
dioxus serve [OPTIONS]
|
||||
dx serve [OPTIONS]
|
||||
|
||||
OPTIONS:
|
||||
--example <EXAMPLE> [default: ""]
|
||||
@@ -19,7 +19,7 @@ OPTIONS:
|
||||
You can use this command to build project and start a dev server:
|
||||
|
||||
```
|
||||
dioxus serve
|
||||
dx serve
|
||||
```
|
||||
|
||||
## Serve Example
|
||||
@@ -28,7 +28,7 @@ You can use the `example` option to serve a example:
|
||||
|
||||
```
|
||||
# serve the `test` example
|
||||
dioxus serve --exmaple test
|
||||
dx serve --exmaple test
|
||||
```
|
||||
|
||||
## Open Browser
|
||||
@@ -36,7 +36,7 @@ dioxus serve --exmaple test
|
||||
You can add the `--open` option to open system default browser when server startup:
|
||||
|
||||
```
|
||||
dioxus serve --open
|
||||
dx serve --open
|
||||
```
|
||||
|
||||
## RSX Hot Reloading
|
||||
@@ -44,7 +44,7 @@ dioxus serve --open
|
||||
You can add the `--hot-reload` flag to enable [rsx hot reloading](https://dioxuslabs.com/docs/0.3/guide/en/getting_started/hot_reload.html). This will allow you to reload some rsx changes without a full recompile:
|
||||
|
||||
```
|
||||
dioxus serve --open
|
||||
dx serve --open
|
||||
```
|
||||
|
||||
## Cross Origin Policy
|
||||
@@ -57,5 +57,5 @@ You can add the `cross-origin-policy` option to change cross-origin header to:
|
||||
```
|
||||
|
||||
```
|
||||
dioxus serve --corss-origin-policy
|
||||
dx serve --corss-origin-policy
|
||||
```
|
||||
@@ -7,7 +7,7 @@ dioxus-translate
|
||||
Translate some source file into a Dioxus component
|
||||
|
||||
USAGE:
|
||||
dioxus translate [OPTIONS] [OUTPUT]
|
||||
dx translate [OPTIONS] [OUTPUT]
|
||||
|
||||
ARGS:
|
||||
<OUTPUT> Output file, defaults to stdout if not present
|
||||
@@ -22,7 +22,7 @@ OPTIONS:
|
||||
You can use the `file` option to set path to the `html` file to translate:
|
||||
|
||||
```
|
||||
dioxus transtale --file ./index.html
|
||||
dx transtale --file ./index.html
|
||||
```
|
||||
|
||||
## Output rsx to a file
|
||||
@@ -30,7 +30,7 @@ dioxus transtale --file ./index.html
|
||||
You can pass a file to the traslate command to set the path to write the output of the command to:
|
||||
|
||||
```
|
||||
dioxus translate --file ./index.html component.rsx
|
||||
dx translate --file ./index.html component.rsx
|
||||
```
|
||||
|
||||
## Output rsx to a file
|
||||
@@ -38,7 +38,7 @@ dioxus translate --file ./index.html component.rsx
|
||||
Setting the `component` option will create a compoent from the HTML:
|
||||
|
||||
```
|
||||
dioxus translate --file ./index.html --component
|
||||
dx translate --file ./index.html --component
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
@@ -15,7 +15,7 @@ dioxus create hello-dioxus
|
||||
>
|
||||
> You can choose to create your project from a different template by passing the `template` argument:
|
||||
> ```
|
||||
> dioxus init hello-dioxus --template=gh:dioxuslabs/dioxus-template
|
||||
> dx init hello-dioxus --template=gh:dioxuslabs/dioxus-template
|
||||
> ```
|
||||
|
||||
Next, move the current directory into your new project:
|
||||
@@ -33,7 +33,7 @@ cd hello-dioxus
|
||||
Finally, create serve your project with the Dioxus CLI:
|
||||
|
||||
```
|
||||
dioxus serve
|
||||
dx serve
|
||||
```
|
||||
|
||||
By default, the CLI serve your site at: [`http://127.0.0.1:8080/`](http://127.0.0.1:8080/)
|
||||
Reference in new issue
Block a user