feat: add Bun packages step (#599)

This commit is contained in:
LeSnake
2023-11-05 03:34:21 +01:00
committed by GitHub
parent 61ef926849
commit 465df2e9be
3 changed files with 10 additions and 0 deletions

View File

@@ -58,6 +58,7 @@ pub enum Step {
BrewCask,
BrewFormula,
Bun,
BunPackages,
Cargo,
Chezmoi,
Chocolatey,

View File

@@ -279,6 +279,7 @@ fn run() -> Result<()> {
runner.execute(Step::Asdf, "asdf", || unix::run_asdf(&ctx))?;
runner.execute(Step::Pkgin, "pkgin", || unix::run_pkgin(&ctx))?;
runner.execute(Step::Bun, "bun", || unix::run_bun(&ctx))?;
runner.execute(Step::Bun, "bun-packages", || unix::run_bun_packages(&ctx))?;
runner.execute(Step::Shell, "zr", || zsh::run_zr(&ctx))?;
runner.execute(Step::Shell, "antibody", || zsh::run_antibody(&ctx))?;
runner.execute(Step::Shell, "antidote", || zsh::run_antidote(&ctx))?;

View File

@@ -555,6 +555,14 @@ pub fn run_bun(ctx: &ExecutionContext) -> Result<()> {
ctx.run_type().execute(bun).arg("upgrade").status_checked()
}
pub fn run_bun_packages(ctx: &ExecutionContext) -> Result<()> {
let bun = require("bun")?;
print_separator("Bun Packages");
ctx.run_type().execute(bun).args(["-g", "update"]).status_checked()
}
/// Update dotfiles with `rcm(7)`.
///
/// See: <https://github.com/thoughtbot/rcm>