diff --git a/packages/cli/Dioxus.toml b/packages/cli/Dioxus.toml
index 792a15165..323f17da2 100644
--- a/packages/cli/Dioxus.toml
+++ b/packages/cli/Dioxus.toml
@@ -1,29 +1,31 @@
[application]
-# dioxus project name
-name = "dioxus-cli"
+# App name
+name = "project_name"
-# default platfrom
-# you can also use `dx serve/build --platform XXX` to use other platform
-# value: web | desktop
-default_platform = "desktop"
+# The Dioxus platform to default to
+default_platform = "web"
-# Web `build` & `serve` dist path
+# `build` & `serve` output path
out_dir = "dist"
-# resource (static) file folder
+# The static resource path
asset_dir = "public"
[web.app]
# HTML title tag content
-title = "dioxus | ⛺"
+title = "project_name"
[web.watcher]
-watch_path = ["src"]
+# When watcher is triggered, regenerate the `index.html`
+reload_html = true
-# include `assets` in web platform
+# Which files or dirs will be monitored
+watch_path = ["src", "public"]
+
+# Include style or script assets
[web.resource]
# CSS style file
@@ -34,12 +36,13 @@ script = []
[web.resource.dev]
-# Javascript code file
-# serve: [dev-server] only
+# Same as [web.resource], but for development servers
+
+# CSS style file
+style = []
+
+# JavaScript files
script = []
-[application.tools]
-
-# use binaryen.wasm-opt for output Wasm file
-# binaryen just will trigger in `web` platform
-binaryen = { wasm_opt = true }
+[[web.proxy]]
+backend = "http://localhost:8000/api/"
\ No newline at end of file
diff --git a/packages/cli/README.md b/packages/cli/README.md
index 3167a6746..fcd9d25b4 100644
--- a/packages/cli/README.md
+++ b/packages/cli/README.md
@@ -1,43 +1,69 @@
-
-
📦✨ Dioxus CLI
+
+
📦✨ Dioxus CLI
Tooling to supercharge Dioxus projects
-**dioxus-cli** (inspired by wasm-pack and webpack) is a tool for getting Dioxus projects up and running.
-It handles all build, bundling, development and publishing to simplify web development.
+The **dioxus-cli** (inspired by wasm-pack and webpack) is a tool for getting Dioxus projects up and running.
+It handles all building, bundling, development and publishing to simplify development.
## Installation
-### Install stable version
+### Install the stable version (recommended)
+
```
cargo install dioxus-cli
```
-### Install from git repository
+
+### Install the latest development build through git
+
+To get the latest bug fixes and features, you can install the development version from git.
+However, this is not fully tested.
+That means you're probably going to have more bugs despite having the latest bug fixes.
+
```
cargo install --git https://github.com/DioxusLabs/dioxus dioxus-cli
```
+
+This will download the CLI from the master branch,
+and install it in Cargo's global binary directory (`~/.cargo/bin/` by default).
+
### Install from local folder
```
cargo install --path . --debug
```
+## Get started
-## Get Started
-
-Use `dx create project-name` to initialize a new Dioxus project.
-
+Use `dx create project-name` to initialize a new Dioxus project.
It will be cloned from the [dioxus-template](https://github.com/DioxusLabs/dioxus-template) repository.
-
-
Alternatively, you can specify the template path:
```
dx create hello --template gh:dioxuslabs/dioxus-template
```
-## Dioxus Config File
+Run `dx --help` for a list of all the available commands.
+Furthermore, you can run `dx
--help` to get help with a specific command.
-Dioxus CLI will use `Dioxus.toml` file to Identify some project info and switch some cli feature.
+## Dioxus config file
-You can get more configure information from [Dioxus CLI Document](https://dioxuslabs.com/cli/configure.html).
+You can use the `Dioxus.toml` file for further configuration.
+Some fields are mandatory, but the CLI tool will tell you which ones are missing.
+You can create a `Dioxus.toml` with all fields already set using `dx config init project-name`,
+or you can use this bare-bones template (only mandatory fields) to get started:
+```toml
+[application]
+name = "project-name"
+# Currently supported platforms: web, desktop
+default_platform = "web"
+
+[web.app]
+title = "Hello"
+
+[web.watcher]
+
+[web.resource.dev]
+```
+
+The full anatomy of `Dioxus.toml` is shown on the [Dioxus website](https://dioxuslabs.com/learn/0.4/CLI/configure).
diff --git a/packages/cli/docs/book.toml b/packages/cli/docs/book.toml
index c5c216fe4..a1e57f634 100644
--- a/packages/cli/docs/book.toml
+++ b/packages/cli/docs/book.toml
@@ -3,4 +3,4 @@ authors = ["YuKun Liu"]
language = "en"
multilingual = false
src = "src"
-title = "Dioxus Cli"
+title = "Dioxus CLI"
diff --git a/packages/cli/docs/src/SUMMARY.md b/packages/cli/docs/src/SUMMARY.md
index b5e3b91ae..98a66ae21 100644
--- a/packages/cli/docs/src/SUMMARY.md
+++ b/packages/cli/docs/src/SUMMARY.md
@@ -2,17 +2,12 @@
- [Introduction](./introduction.md)
- [Installation](./installation.md)
-- [Create a Project](./creating.md)
-- [Configure Project](./configure.md)
-- [Commands](./cmd/README.md)
- - [Build](./cmd/build.md)
- - [Serve](./cmd/serve.md)
- - [Clean](./cmd/clean.md)
- - [Translate](./cmd/translate.md)
-- [Plugin Development](./plugin/README.md)
- - [API.Log](./plugin/interface/log.md)
- - [API.Command](./plugin/interface/command.md)
- - [API.OS](./plugin/interface/os.md)
- - [API.Directories](./plugin/interface/dirs.md)
- - [API.Network](./plugin/interface/network.md)
- - [API.Path](./plugin/interface/path.md)
\ No newline at end of file
+- [Create a project](./creating.md)
+- [Configure a project](./configure.md)
+- [Plugin development](./plugin/README.md)
+ - [API.Log](plugin/interface/log.md)
+ - [API.Command](plugin/interface/command.md)
+ - [API.OS](plugin/interface/os.md)
+ - [API.Directories](plugin/interface/dirs.md)
+ - [API.Network](plugin/interface/network.md)
+ - [API.Path](plugin/interface/path.md)
\ No newline at end of file
diff --git a/packages/cli/docs/src/cmd/README.md b/packages/cli/docs/src/cmd/README.md
deleted file mode 100644
index 735794635..000000000
--- a/packages/cli/docs/src/cmd/README.md
+++ /dev/null
@@ -1,30 +0,0 @@
-# Commands
-
-In this chapter we will introduce all `dioxus-cli` commands.
-
-> You can also use `dx --help` to get cli help info.
-
-```
-Build, Bundle & Ship Dioxus Apps
-
-Usage: dx [OPTIONS]
-
-Commands:
- build Build the Rust WASM app and all of its assets
- translate Translate some source file into Dioxus code
- serve Build, watch & serve the Rust WASM app and all of its assets
- create Init a new project for Dioxus
- clean Clean output artifacts
- bundle Bundle the Rust desktop app and all of its assets
- version Print the version of this extension
- fmt Format some rsx
- check Check the Rust files in the project for issues
- config Dioxus config file controls
- help Print this message or the help of the given subcommand(s)
-
-Options:
- -v Enable verbose logging
- --bin Specify bin target
- -h, --help Print help
- -V, --version Print version
-```
diff --git a/packages/cli/docs/src/cmd/build.md b/packages/cli/docs/src/cmd/build.md
deleted file mode 100644
index 6109d14f1..000000000
--- a/packages/cli/docs/src/cmd/build.md
+++ /dev/null
@@ -1,56 +0,0 @@
-# Build
-
-The `dx build` command can help you `pack & build` a dioxus project.
-
-```
-dioxus-build
-Build the Rust WASM app and all of its assets
-
-USAGE:
- dx build [OPTIONS]
-
-OPTIONS:
- --example [default: ""]
- --platform [default: "default_platform"]
- --release [default: false]
- --bin [default: None]
-```
-
-You can use this command to build a project:
-
-```
-dx build --release
-```
-
-## Target platform
-
-Use the `platform` option to choose your target platform:
-
-```
-# for desktop project
-dx build --platform desktop
-```
-
-`platform` currently only supports `desktop` & `web`.
-
-```
-# for web project
-dx build --platform web
-```
-
-## Specify workspace bin
-
-You can add the `--bin` option to select which crate you want Dioxus to build:
-
-```
-dx build --bin app
-```
-
-## Build Example
-
-You can use the `example` option to select a example to build:
-
-```
-# build the `test` example
-dx build --exmaple test
-```
diff --git a/packages/cli/docs/src/cmd/clean.md b/packages/cli/docs/src/cmd/clean.md
deleted file mode 100644
index ef938d245..000000000
--- a/packages/cli/docs/src/cmd/clean.md
+++ /dev/null
@@ -1,27 +0,0 @@
-# Clean
-
-`dx clean` will clear the build artifacts (the out_dir and the cargo cache)
-
-```
-dioxus-clean
-Clean build artifacts
-
-USAGE:
- dx clean [OPTIONS]
-
-OPTIONS:
- --bin [default: None]
-```
-
-# Example
-
-```
-dx clean
-```
-
-# Specify workspace bin
-You can add the `--bin` option to select which crate you want Dioxus to clean artifacts from:
-
-```
-dx clean --bin app
-```
diff --git a/packages/cli/docs/src/cmd/serve.md b/packages/cli/docs/src/cmd/serve.md
deleted file mode 100644
index d8b4e0d42..000000000
--- a/packages/cli/docs/src/cmd/serve.md
+++ /dev/null
@@ -1,70 +0,0 @@
-# Serve
-
-The `dx serve` can start a dev server with hot-reloading
-
-```
-dioxus-serve
-Build, watch & serve the Rust WASM app and all of its assets
-
-USAGE:
- dx serve [OPTIONS]
-
-OPTIONS:
- --example [default: ""]
- --platform [default: "default_platform"]
- --release [default: false]
- --hot-reload [default: false]
- --bin [default: None]
-```
-
-You can use this command to build project and start a dev server:
-
-```
-dx serve
-```
-
-## Serve Example
-
-You can use the `example` option to serve a example:
-
-```
-# serve the `test` example
-dx serve --exmaple test
-```
-
-## Specify workspace bin
-
-You can add the `--bin` option to select which crate you want Dioxus to build and serve:
-
-```
-dx serve --bin app
-```
-
-## Open Browser
-
-You can add the `--open` option to open system default browser when server startup:
-
-```
-dx serve --open
-```
-
-## RSX Hot Reloading
-
-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:
-
-```
-dx serve --open
-```
-
-## Cross Origin Policy
-
-You can add the `cross-origin-policy` option to change cross-origin header to:
-
-```
- Cross-Origin-Opener-Policy: same-origin
- Cross-Origin-Embedder-Policy: require-corp
-```
-
-```
-dx serve --corss-origin-policy
-```
diff --git a/packages/cli/docs/src/cmd/translate.md b/packages/cli/docs/src/cmd/translate.md
deleted file mode 100644
index b03b4422c..000000000
--- a/packages/cli/docs/src/cmd/translate.md
+++ /dev/null
@@ -1,68 +0,0 @@
-# Translate
-
-`dx translate` can translate some `html` file into a Dioxus compoent
-
-```
-dioxus-translate
-Translate some source file into a Dioxus component
-
-USAGE:
- dx translate [OPTIONS] [OUTPUT]
-
-ARGS:
-