From f8368447912d9d48e2c8ee4db1ba7b6010ec955c Mon Sep 17 00:00:00 2001 From: Daniel Dolezal Date: Fri, 1 May 2026 19:44:18 +0200 Subject: [PATCH] run nm ci when not already installed into repository folder --- README.md | 3 +-- shell.nix | 7 +++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5da1947..2ad49ba 100644 --- a/README.md +++ b/README.md @@ -414,8 +414,7 @@ uv run pytest -q On NixOS or hosts without global Node/npm: ```sh -nix-shell -npm ci +nix-shell # automatically runs npm ci when node_modules is missing/outdated npm run check:extension ``` diff --git a/shell.nix b/shell.nix index b853b3b..ba96c61 100644 --- a/shell.nix +++ b/shell.nix @@ -9,5 +9,12 @@ pkgs.mkShell { shellHook = '' echo "browser-cli dev shell: node $(node --version), npm $(npm --version), uv $(uv --version)" + + if [ -f package-lock.json ]; then + if [ ! -f node_modules/.package-lock.json ] || [ package-lock.json -nt node_modules/.package-lock.json ]; then + echo "Installing extension dependencies with npm ci..." + npm ci + fi + fi ''; }