Skip to content

Commit

Permalink
Use PNPM for docs
Browse files Browse the repository at this point in the history
  • Loading branch information
NigelBreslaw committed Oct 16, 2024
1 parent c2dccea commit 8fd3f20
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions xtask/src/slintdocs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,14 @@ pub fn generate(show_warnings: bool) -> Result<(), Box<dyn std::error::Error>> {
{
let sh = Shell::new()?;
let _p = sh.push_dir(root.join("docs/editor"));
cmd!(sh, "npm install").run()?;
cmd!(sh, "npm run build").run()?;
let pnpm_check_output = cmd!(sh, "which pnpm").ignore_stdout().ignore_stderr().run();

if pnpm_check_output.is_err() {
eprintln!("Warning: 'pnpm' is not installed. Please install 'npm install -g pnpm' to proceed.");
return Err(anyhow::anyhow!("'pnpm' is not installed.").into());
}
cmd!(sh, "pnpm install --frozen-lockfile --ignore-scripts").run()?;
cmd!(sh, "pnpm build").run()?;
}

let pip_env = vec![(OsString::from("PIPENV_PIPFILE"), docs_source_dir.join("Pipfile"))];
Expand Down

0 comments on commit 8fd3f20

Please sign in to comment.