Clean up build scripts to work on non-nightly rust versions

This commit is contained in:
Austen Adler 2021-08-22 12:11:36 -04:00
parent 0787c19b90
commit d13432e35d
4 changed files with 16 additions and 38 deletions

View File

@ -3,7 +3,7 @@ use std::process::Command;
fn main() {
let profile = std::env::var("PROFILE").unwrap();
Command::new("npm")
let success = Command::new("npm")
.current_dir("./liveview-rust/js")
.args(&["run-script", "build"])
.env(
@ -18,7 +18,9 @@ fn main() {
.unwrap()
.wait()
.unwrap()
.success()
.then(|| ())
.unwrap()
.success();
if !success {
panic!("Npm build failed");
}
}

View File

@ -1,11 +1,9 @@
use std::process::Command;
// use std::io::{ErrorKind,Error};
// use std::error::Error;
fn main() {
let profile = std::env::var("PROFILE").unwrap();
Command::new("npm")
let success = Command::new("npm")
.current_dir("./js")
.args(&["run-script", "build"])
.env(
@ -16,5 +14,13 @@ fn main() {
r => panic!("Unknown release type: {}", r),
},
)
.spawn().unwrap().wait().unwrap().success().then(|| ()).unwrap()
.spawn()
.unwrap()
.wait()
.unwrap()
.success();
if !success {
panic!("Npm build failed");
}
}

25
package-lock.json generated
View File

@ -1,25 +0,0 @@
{
"requires": true,
"lockfileVersion": 1,
"dependencies": {
"jquery": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz",
"integrity": "sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw=="
},
"liveview-rust": {
"version": "0.0.8",
"resolved": "https://registry.npmjs.org/liveview-rust/-/liveview-rust-0.0.8.tgz",
"integrity": "sha512-7UwvtKKPzHD/b9BYcbxoeao77Ewb6/5ib5gS5NUJ3nozjAbSz0uJFJOklRhpJf5P8gOPYJuEAwDN64e2Y4UVOw==",
"requires": {
"jquery": "^3.5.0",
"morphdom": "^2.5.12"
}
},
"morphdom": {
"version": "2.6.1",
"resolved": "https://registry.npmjs.org/morphdom/-/morphdom-2.6.1.tgz",
"integrity": "sha512-Y8YRbAEP3eKykroIBWrjcfMw7mmwJfjhqdpSvoqinu8Y702nAwikpXcNFDiIkyvfCLxLM9Wu95RZqo4a9jFBaA=="
}
}
}

View File

@ -1,5 +0,0 @@
{
"dependencies": {
"liveview-rust": "^0.0.8"
}
}