Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove: default_platform in Dioxus.toml #3108

Merged
merged 1 commit into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions packages/cli/Dioxus.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
6 changes: 0 additions & 6 deletions packages/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 0 additions & 8 deletions packages/cli/src/config/app.rs
Original file line number Diff line number Diff line change
@@ -1,23 +1,15 @@
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,

#[serde(default)]
pub(crate) sub_package: Option<String>,
}

pub(crate) fn default_platform() -> Platform {
Platform::Web
}

pub(crate) fn asset_dir_default() -> PathBuf {
PathBuf::from("assets")
}
1 change: 0 additions & 1 deletion packages/cli/src/config/dioxus_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
Expand Down
Loading