Support public dir (#4783)
* Add optional static_dir support - add optional application.static_dir field defaulting to none - copy configured static directory into web output during build/serve - document config knob and add unit tests - force full rebuild when static_dir contents change - sync removes stale outputs and logs copy activity - track static manifest next to platform dir Tests: cargo fmt * default to public dir to match vite * static_dir -> public_dir * wip * deser as none... * wip... use .manifest.json * implement dumb form of asset manifest generation * implement manifest using asset system directly * cleanup * dont create extra asset dir for server --------- Co-authored-by: Evan Almloff <evanalmloff@gmail.com> Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
This commit is contained in:
10 files changed
+245
-78
No files matched your search
@@ -3,7 +3,7 @@ use manganis::AssetOptions;
|
||||
use manganis_core::BundledAsset;
|
||||
use rayon::iter::{IntoParallelRefIterator, ParallelIterator};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::collections::{HashMap, HashSet};
|
||||
use std::collections::{BTreeMap, HashSet};
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::sync::{Arc, RwLock};
|
||||
|
||||
@@ -25,7 +25,7 @@ pub use hash::add_hash_to_asset;
|
||||
#[derive(Debug, PartialEq, Default, Clone, Serialize, Deserialize)]
|
||||
pub struct AssetManifest {
|
||||
/// Map of bundled asset name to the asset itself
|
||||
assets: HashMap<PathBuf, HashSet<BundledAsset>>,
|
||||
assets: BTreeMap<PathBuf, HashSet<BundledAsset>>,
|
||||
}
|
||||
|
||||
impl AssetManifest {
|
||||
|
||||
Reference in new issue
Block a user