substrate_manager/ops/
substrate_frontend.rs1use std::{process::Command, path::{Path, PathBuf}};
2
3use anyhow::Ok;
4
5use crate::util::SubstrateResult;
6
7pub fn clone_substrate_frontend_template(path: &Path) -> SubstrateResult<()> {
8 Command::new("git")
9 .args([
10 "clone",
11 "git@github.com:substrate-developer-hub/substrate-front-end-template.git",
12 path.to_str().unwrap()
13 ])
14 .status()?;
15 Command::new("yarn")
16 .current_dir(path)
17 .args(["install"])
18 .status()?;
19 Ok(())
20}
21
22pub fn frontend() -> SubstrateResult<()> {
27 Command::new("yarn")
28 .current_dir("frontend")
29 .args(["start"])
30 .status()?;
31
32 Ok(())
33}