add logs when the desktop or fullstack application is collecting assets

This commit is contained in:
Evan Almloff committed 2023-10-10 10:26:16 -05:00
1 parent b76f129083
commit 426a342700
8 files changed
+82

No files matched your search

+7
View File
@@ -12,6 +12,10 @@ pub fn copy_assets() {
)
))]
{
// The CLI will copy assets to the current working directory
if std::env::var_os("DIOXUS_ACTIVE").is_some() {
return;
}
use manganis_cli_support::AssetManifest;
use manganis_cli_support::AssetManifestExt;
use manganis_cli_support::Config;
@@ -21,6 +25,7 @@ pub fn copy_assets() {
let asset_location = PathBuf::from(asset_location);
let _ = std::fs::remove_dir_all(&asset_location);
println!("Finding assets... (Note: if you run a dioxus desktop application with the CLI. This process will be significantly faster.)");
let manifest = AssetManifest::load();
let has_assets = manifest
.packages()
@@ -31,6 +36,8 @@ pub fn copy_assets() {
println!("Copying and optimizing assets...");
manifest.copy_static_assets_to(&asset_location).unwrap();
println!("Copied assets to {}", asset_location.display());
} else {
println!("No assets found");
}
}
#[cfg(not(all(