瀏覽代碼

remove: default_platform toml field (#3108)

Miles Murgaw 8 月之前
父節點
當前提交
8a0eca1c8a
共有 4 個文件被更改,包括 0 次插入18 次删除
  1. 0 3
      packages/cli/Dioxus.toml
  2. 0 6
      packages/cli/README.md
  3. 0 8
      packages/cli/src/config/app.rs
  4. 0 1
      packages/cli/src/config/dioxus_config.rs

+ 0 - 3
packages/cli/Dioxus.toml

@@ -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"
 

+ 0 - 6
packages/cli/README.md

@@ -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.

+ 0 - 8
packages/cli/src/config/app.rs

@@ -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")
 }

+ 0 - 1
packages/cli/src/config/dioxus_config.rs

@@ -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,
             },