Merge pull request #83 from mrxiaozhuox/master

Fixed docs workflow
This commit is contained in:
Jon Kelley 2022-12-11 04:29:11 -08:00 committed by GitHub
commit 62bc72e3d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 32 deletions

View file

@ -5,7 +5,7 @@ on:
paths: paths:
- docs/** - docs/**
branches: branches:
- main - master
jobs: jobs:
deploy: deploy:

View file

@ -2,51 +2,28 @@
<h1>📦✨ Dioxus CLI </h1> <h1>📦✨ Dioxus CLI </h1>
<p><strong>Tooling to supercharge Dioxus projects</strong></p> <p><strong>Tooling to supercharge Dioxus projects</strong></p>
</div> </div>
**dioxus-cli** (inspired by wasm-pack and webpack) is a tool for getting Dioxus projects up and running. It handles all of the build, bundling, development and publishing to simplify web development.
`dioxus-cli` (inspired by wasm-pack and webpack) is a tool for getting Dioxus projects up and running. It handles all of the build, bundling, development and publishing to simplify web development.
# Installation ## Installation
## Stable ### Install stable version
``` ```
cargo install dioxus-cli cargo install dioxus-cli
``` ```
## Latest ### Install from git repository
``` ```
cargo install --git https://github.com/DioxusLabs/cli cargo install --git https://github.com/DioxusLabs/cli
``` ```
## Developing ### Install from local folder
``` ```
cargo install --path . --debug cargo install --path . --debug
``` ```
Now that `dioxus` is in the path, use `dioxus --help` to see the help information.
```
dioxus 0.1.2
Build, Bundle & Ship Dioxus Apps
USAGE:
dioxus [FLAGS] <SUBCOMMAND>
FLAGS:
-h, --help Prints help information
-v Enable verbose logging
-V, --version Prints version information
SUBCOMMANDS:
build Build the Rust WASM app and all of its assets
clean Clean output artifacts
config Dioxus config file controls
create Init a new project for Dioxus
help Prints this message or the help of the given subcommand(s)
serve Build, watch & serve the Rust WASM app and all of its assets
translate Translate some source file into Dioxus code
```
## Get Started ## Get Started
Use `dioxus create project_name` to initialize a new Dioxus project. <br> Use `dioxus create project-name` to initialize a new Dioxus project. <br>
It will be cloned from the [dioxus-template](https://github.com/DioxusLabs/dioxus-template) repository. It will be cloned from the [dioxus-template](https://github.com/DioxusLabs/dioxus-template) repository.
@ -57,3 +34,9 @@ Alternatively, you can specify the template path:
``` ```
dioxus create hello --template gh:dioxuslabs/dioxus-template dioxus create hello --template gh:dioxuslabs/dioxus-template
``` ```
## Dioxus Config File
Dioxus CLI will use `Dioxus.toml` file to Identify some project info and switch some cli feature.
You can get more configure information from [Dioxus CLI Document](https://dioxuslabs.com/cli/configure.html).

View file

@ -8,7 +8,7 @@ use cargo_metadata::{diagnostic::Diagnostic, Message};
use indicatif::{ProgressBar, ProgressStyle}; use indicatif::{ProgressBar, ProgressStyle};
use serde::Serialize; use serde::Serialize;
use std::{ use std::{
fs::{copy, create_dir_all, remove_dir_all, File}, fs::{copy, create_dir_all, File},
io::Read, io::Read,
panic, panic,
path::PathBuf, path::PathBuf,
@ -241,7 +241,7 @@ pub fn build(config: &CrateConfig, quiet: bool) -> Result<BuildResult> {
}) })
} }
pub fn build_desktop(config: &CrateConfig, is_serve: bool) -> Result<()> { pub fn build_desktop(config: &CrateConfig, _is_serve: bool) -> Result<()> {
log::info!("🚅 Running build [Desktop] command..."); log::info!("🚅 Running build [Desktop] command...");
let ignore_files = build_assets(config)?; let ignore_files = build_assets(config)?;