Skip to content
Open
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
9 changes: 8 additions & 1 deletion packages/cli/src/build/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2665,9 +2665,16 @@ impl BuildRequest {
self.crate_target.kind[0].clone()
}

/// The application name. PascalCase version of the crate name by default.
/// May be overridden using [`ApplicationConfig::name`][crate::ApplicationConfig::name].
pub(crate) fn bundled_app_name(&self) -> String {
use convert_case::{Case, Casing};
self.executable_name().to_case(Case::Pascal)

self.config
.application
.name
.clone()
.unwrap_or_else(|| self.executable_name().to_case(Case::Pascal))
}

/// Get the crate version from Cargo.toml (e.g., "0.1.0")
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/bundler/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ impl<'a> BundleContext<'a> {
self.package_types.clone()
}

/// The product name (PascalCase).
/// The product name.
pub(crate) fn product_name(&self) -> String {
self.build.bundled_app_name()
}
Expand Down