use manganis_cli_support::{AssetManifestExt, ManganisSupportGuard};
use manganis_common::{AssetManifest, Config};
fn main() {
use std::process::Command;
let assets_file_location = "./assets";
let assets_serve_location = "/assets";
Config::default()
.with_assets_serve_location(assets_serve_location)
.save();
let _guard = ManganisSupportGuard::default();
Command::new("cargo")
.args(["build"])
.spawn()
.unwrap()
.wait()
.unwrap();
let manifest = AssetManifest::load(Some("test-package"));
let _ = std::fs::remove_dir_all(assets_file_location);
manifest
.copy_static_assets_to(assets_file_location)
.unwrap();
let css = manifest.collect_tailwind_css(true, &mut Vec::new());
std::fs::write(format!("{}/tailwind.css", assets_file_location), css).unwrap();
}