diff --git a/build.rs b/build.rs index 54e0296..f6717e5 100644 --- a/build.rs +++ b/build.rs @@ -1,14 +1,23 @@ use std::{fs::File, io::Read, process::Command}; fn main() { + Command::new("./sciter/packfolder.exe") + .arg("./src/celemod-ui/dist") + .arg("./resources/dist.rc") + .arg("-binary") + .spawn() + .unwrap(); + let output = Command::new("git") .args(&["rev-parse", "HEAD"]) .output() .unwrap(); let git_hash = String::from_utf8(output.stdout).unwrap(); let mut version = "".to_string(); - File::open("version.txt").unwrap() - .read_to_string(&mut version).unwrap(); + File::open("version.txt") + .unwrap() + .read_to_string(&mut version) + .unwrap(); println!("cargo:rustc-env=VERSION={}", version); println!("cargo:rustc-env=GIT_HASH={}", git_hash); @@ -24,18 +33,10 @@ fn main() { "x86" => "win-x86", _ => panic!("Unsupported target"), } - }, + } "linux" => "linux", "darwin" => "osx", _ => panic!("Unsupported target"), }; println!("cargo:rustc-env=TARGET={}", target); - - - Command::new("./sciter/packfolder.exe") - .arg("./src/celemod-ui/dist") - .arg("./resources/dist.rc") - .arg("-binary") - .spawn() - .unwrap(); } diff --git a/src/celemod-ui/package.json b/src/celemod-ui/package.json index 5532d4d..279d6ce 100644 --- a/src/celemod-ui/package.json +++ b/src/celemod-ui/package.json @@ -5,6 +5,7 @@ "build": "node build.js --prod" }, "dependencies": { + "@babel/code-frame": "^7.23.5", "@types/react-window": "^1.8.5", "@types/react-window-infinite-loader": "^1.0.6", "immer": ">=9.0", diff --git a/src/celemod-ui/yarn.lock b/src/celemod-ui/yarn.lock index 67b091e..377f1f7 100644 --- a/src/celemod-ui/yarn.lock +++ b/src/celemod-ui/yarn.lock @@ -17,6 +17,14 @@ dependencies: "@babel/highlight" "^7.22.5" +"@babel/code-frame@^7.23.5": + version "7.23.5" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.23.5.tgz#9009b69a8c602293476ad598ff53e4562e15c244" + integrity sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA== + dependencies: + "@babel/highlight" "^7.23.4" + chalk "^2.4.2" + "@babel/compat-data@^7.22.5", "@babel/compat-data@^7.22.6", "@babel/compat-data@^7.22.9": version "7.22.9" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.22.9.tgz#71cdb00a1ce3a329ce4cbec3a44f9fef35669730" @@ -214,6 +222,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz#533f36457a25814cf1df6488523ad547d784a99f" integrity sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw== +"@babel/helper-validator-identifier@^7.22.20": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz#c4ae002c61d2879e724581d96665583dbc1dc0e0" + integrity sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A== + "@babel/helper-validator-identifier@^7.22.5": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz#9544ef6a33999343c8740fa51350f30eeaaaf193" @@ -251,6 +264,15 @@ chalk "^2.0.0" js-tokens "^4.0.0" +"@babel/highlight@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.23.4.tgz#edaadf4d8232e1a961432db785091207ead0621b" + integrity sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A== + dependencies: + "@babel/helper-validator-identifier" "^7.22.20" + chalk "^2.4.2" + js-tokens "^4.0.0" + "@babel/parser@^7.22.5", "@babel/parser@^7.22.7", "@babel/parser@^7.4.4": version "7.22.7" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.22.7.tgz#df8cf085ce92ddbdbf668a7f186ce848c9036cae"