all repos — nixfiles @ aab50979a94128c80b3bb3594e22c81ef81d0252

System and user configuration, managed by nix and home-manager

javascript: add configuration and aliases for bun
Alan Pearce alan@alanpearce.eu
Mon, 11 Sep 2023 07:05:49 +0200
commit

aab50979a94128c80b3bb3594e22c81ef81d0252

parent

9c83d41a312f99125f06fa4c16f9d2a227d5a300

1 files changed, 23 insertions(+), 0 deletions(-)

jump to
M user/settings/development/javascript.nixuser/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/