mirror of
https://github.com/Noratrieb/haesli.git
synced 2026-01-14 19:55:03 +01:00
add yarn install to formatting
This commit is contained in:
parent
4f5f9d6513
commit
8070cfc2a9
4 changed files with 43 additions and 20 deletions
|
|
@ -1,4 +1,4 @@
|
|||
use crate::project_root;
|
||||
use crate::{project_root, yarn_install};
|
||||
use anyhow::ensure;
|
||||
use std::process::Command;
|
||||
|
||||
|
|
@ -10,17 +10,21 @@ pub fn main() -> anyhow::Result<()> {
|
|||
.status()?;
|
||||
ensure!(status.success(), "`cargo fmt` did not exit successfully");
|
||||
|
||||
let test_js = project_root().join("test-js");
|
||||
yarn_install(&test_js)?;
|
||||
println!("$ yarn fmt");
|
||||
let status = Command::new("yarn")
|
||||
.arg("fmt")
|
||||
.current_dir(project_root().join("test-js"))
|
||||
.current_dir(test_js)
|
||||
.status()?;
|
||||
ensure!(status.success(), "`yarn fmt` did not exist successfully");
|
||||
|
||||
let frontend = project_root().join("amqp_dashboard/frontend");
|
||||
yarn_install(&frontend)?;
|
||||
println!("$ yarn fmt");
|
||||
let status = Command::new("yarn")
|
||||
.arg("fmt")
|
||||
.current_dir(project_root().join("amqp_dashboard/frontend"))
|
||||
.current_dir(frontend)
|
||||
.status()?;
|
||||
ensure!(status.success(), "`yarn fmt` did not exist successfully");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue