Skip to content
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
13 changes: 1 addition & 12 deletions packages/cli/assets/dioxus.toml
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
[application]

# dioxus project name
name = "{{project-name}}"

# default platform
# you can also use `dx serve/build --platform XXX` to use other platform
# value: web | desktop
default_platform = "{{default-platform}}"

# Web `build` & `serve` dist path
out_dir = "dist"

# resource (static) file folder
asset_dir = "public"

# hot reload by default
hot_reload = true

[web.wasm_opt]
# The level wasm-opt should target. z is the smallest. 4 is the fastest.
level = "4"
Expand All @@ -32,7 +21,7 @@ index_on_404 = true

watch_path = ["src", "examples"]

[bundler]
[bundle]
# Bundle identifier
identifier = "io.github.{{project-name}}"

Expand Down
Binary file removed packages/cli/assets/icon.ico
Binary file not shown.
13 changes: 2 additions & 11 deletions packages/cli/src/cli/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ pub(crate) enum Config {
#[clap(long)]
#[serde(default)]
force: bool,

/// Project default platform
#[clap(long, default_value = "web")]
platform: String,
},

/// Format print Dioxus config.
Expand Down Expand Up @@ -78,11 +74,7 @@ impl Config {
pub(crate) fn config(self) -> Result<StructuredOutput> {
let crate_root = crate_root()?;
match self {
Config::Init {
name,
force,
platform,
} => {
Config::Init { name, force } => {
let conf_path = crate_root.join("Dioxus.toml");
if conf_path.is_file() && !force {
tracing::warn!(
Expand All @@ -92,8 +84,7 @@ impl Config {
}
let mut file = File::create(conf_path)?;
let content = String::from(include_str!("../../assets/dioxus.toml"))
.replace("{{project-name}}", &name)
.replace("{{default-platform}}", &platform);
.replace("{{project-name}}", &name);
file.write_all(content.as_bytes())?;
tracing::info!(dx_src = ?TraceSrc::Dev, "🚩 Init config file completed.");
}
Expand Down
Loading