javascript: add configuration and aliases for bun
Alan Pearce alan@alanpearce.eu
Mon, 11 Sep 2023 07:05:49 +0200
1 files changed, 23 insertions(+), 0 deletions(-)
M user/settings/development/javascript.nix → user/settings/development/javascript.nix
@@ -103,6 +103,17 @@ pdi = "pnpm dislink"; pul = "pnpm unlink"; px = "pnpx"; + bn = "bun"; + bni = "bun install"; + bna = "bun add"; + bnad = "bun add --dev"; + bnr = "bun run"; + bnu = "bun update"; + bnrm = "bun remove"; + bnd = "bun dev"; + bnp = "bun pm"; + bnl = "bun pm ls"; + np = "npm"; npi = "npm install"; npl = "npm ls"; @@ -120,6 +131,18 @@ npli = "npm link"; npul = "npm unlink"; }; + programs.git.attributes = [ + "*.lockb diff=lockb" + ]; + programs.git.extraConfig."diff.lockb" = { + textconv = "bun"; + binary = true; + }; + + xdg.configFile.".bunfig.toml".text = '' + [install.cache] + dir = "${config.xdg.cacheHome}/bun/" + ''; xdg.configFile."npm/config".text = '' prefix=''${HOME}/.local cache=${config.xdg.cacheHome}/npm/