Templates: packages keep indented project JSON, as the docs say; only Save Compact applies

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
bflatastic
2026-10-30 03:40:12 +07:00
co-authored by Claude Opus 5.5
parent bcf2d2b7e5
commit 31a2716a19
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -865,7 +865,7 @@ fn export_template(s: &mut Session, p: &Value) -> Result<Value> {
{
entries.push(("poster.png".into(), png));
}
entries.insert(0, ("project.ecproj".into(), sub.to_json_compact().into_bytes()));
entries.insert(0, ("project.ecproj".into(), sub.to_json().into_bytes()));
entries.insert(0, ("manifest.json".into(), serde_json::to_vec_pretty(&manifest).unwrap_or_default()));
let bytes = effectcraft_lottie::zip::store(&entries);
s.services.write_file(&path, &bytes).map_err(|e| EngineError::Other(format!("cannot write {path}: {e}")))?;
+1 -1
View File
@@ -895,7 +895,7 @@ fn save_as(s: &mut Session, p: &Value) -> Result<Value> {
let t = s.time_of(cid);
let mut entries: Vec<(String, Vec<u8>)> = vec![
("manifest.json".into(), serde_json::to_vec_pretty(&manifest).unwrap_or_default()),
("project.ecproj".into(), proj.to_json_compact().into_bytes()),
("project.ecproj".into(), proj.to_json().into_bytes()),
];
entries.extend(media_entries);
if let Ok((w, h, rgba)) = s.render_rgba8(cid, t, 320) {