/pnpm-run-hack

Primary LanguageJavaScript

auto installation when pnpm run command is executed

Use node-options=--import=./.pnpm-run.mjs option allow to hook pnpm run scripts.

Demo

git checkout old-deps
pnpm install

# back to the latest version
git checkout main
pnpm run dev
# if node_modules and pnpm-lock.yaml are different, 
# automatically install the dependencies which is defined in pnpm-lock.yaml
# and start the development server
May-16-2024.01-21-09_optimized.mp4