frontend integration

This commit is contained in:
realaravinth
2021-04-09 14:21:43 +05:30
parent c4255397b1
commit 0496c0bdaf
95 changed files with 7115 additions and 197 deletions

View File

@@ -15,6 +15,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
use cache_buster::BusterBuilder;
use std::process::Command;
fn main() {
@@ -32,4 +33,28 @@ fn main() {
"cargo:rustc-env=OPEN_API_DOCS={}",
serde_json::to_string(&api_json).unwrap()
);
cache_bust();
}
fn cache_bust() {
let types = vec![
mime::IMAGE_PNG,
mime::IMAGE_SVG,
mime::IMAGE_JPEG,
mime::IMAGE_GIF,
mime::APPLICATION_JAVASCRIPT,
mime::TEXT_CSS,
];
let config = BusterBuilder::default()
.source("./static")
.result("./prod")
.mime_types(types)
.copy(true)
.follow_links(true)
.build()
.unwrap();
config.init().unwrap();
config.hash().unwrap().to_env();
}