* Add passthrough to cargo build
* Add platform_triple flag
* Add handling to bundle and serve commands
* Show full stacked error from Tauri in bundling
Previously only the top-level error was shown, giving only vague data
for debugging the build process
* Adjust bundle platform triple when cross compiling
* Rename --platform-triple to --target
* restore some deleted docs on CLI commands
---------
Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
* Make autofmt ignore gitignored files
* don't panic if it can't get the git ignore files
* replace some with ok
* Filter rs files from gitignore
* fmt
* remove early return
* only ignore paths that start with target
---------
Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
The README for cli gets included in lib.rs via `include_str!`. The code snippets then get assumed to be Rust, which fails if running `cargo test --doc`. This is not a huge problem, but was brought to my attention because Nix's `buildRustPackage` runs `cargo test` including doc tests (unlike what get run for this project on CI). This means I can't update the Nix package to 0.4.3 without changing the test flags (which I think I'll see about doing anyways, as that's how Dioxus runs CI).
* fix false notification/rebuild for dx hot-reload
* Make sure we have permissions and the changed file exists before reading the metadata
---------
Co-authored-by: ealmloff <evanalmloff@gmail.com>
* Related to #1547: use `dioxus-cli` within a workspace
Although the `dx` CLI allows to specify a package name to chose from workspace members,
it does not support workspace members specified as glob-wildcards.
Neither it respects the effective package name, specified in the crate's `Cargo.toml`.
This PR addresses that issue:
- upon `dx build ...`, if the `--bin` CLI-argument is provided, treat the current dir as a workspace;
- search through the workspace's `members`: resolve each of them with `glob`;
- assume that any workspace member has a `Cargo.toml` in it (cargo does it, so it's okay);
- read said manifest, and check the package name in it;
- if found — there we have our sought package.
* Use cargo-metadata to find out the workspace structure
* glob is unused
Adds the ability to specify an indent string to public autofmt methods - either
a sequence of spaces or a tab character.
Get the indentation style and size from rustfmt for dx fmt, or from the editor
settings for the vscode extension.
Closes#1595