remove: default_platform toml field (#3108)

This commit is contained in:
Miles Murgaw 2024-10-28 14:20:35 -04:00 committed by GitHub
parent d3404bd13a
commit 8a0eca1c8a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 0 additions and 18 deletions

View file

@ -3,9 +3,6 @@
# App name
name = "project_name"
# The Dioxus platform to default to
default_platform = "web"
# `build` & `serve` output path
out_dir = "dist"

View file

@ -33,12 +33,6 @@ Note: The CLI will fail to build projects in debug profile. This is currently un
cargo install --path .
```
### Developing The CLI
It's faster to build the CLI using the `cli-dev` profile when testing changes.
```shell
cargo build --profile cli-dev
```
## Get started
Use `dx new` to initialize a new Dioxus project.

View file

@ -1,12 +1,8 @@
use crate::Platform;
use serde::{Deserialize, Serialize};
use std::path::PathBuf;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub(crate) struct ApplicationConfig {
#[serde(default = "default_platform")]
pub(crate) default_platform: Platform,
#[serde(default = "asset_dir_default")]
pub(crate) asset_dir: PathBuf,
@ -14,10 +10,6 @@ pub(crate) struct ApplicationConfig {
pub(crate) sub_package: Option<String>,
}
pub(crate) fn default_platform() -> Platform {
Platform::Web
}
pub(crate) fn asset_dir_default() -> PathBuf {
PathBuf::from("assets")
}

View file

@ -22,7 +22,6 @@ impl Default for DioxusConfig {
fn default() -> Self {
Self {
application: ApplicationConfig {
default_platform: default_platform(),
asset_dir: asset_dir_default(),
sub_package: None,
},