npmHooks.npmInstallHook: pass --no-save to prune

This commit is contained in:
Winter 2022-11-23 21:11:45 -05:00
parent fde0382efd
commit 7ab5323cfb

View File

@ -27,7 +27,7 @@ npmInstallHook() {
local -r nodeModulesPath="$packageOut/node_modules"
if [ ! -d "$nodeModulesPath" ]; then
npm prune --omit dev $npmInstallFlags "${npmInstallFlagsArray[@]}" $npmFlags "${npmFlagsArray[@]}"
npm prune --omit dev --no-save $npmInstallFlags "${npmInstallFlagsArray[@]}" $npmFlags "${npmFlagsArray[@]}"
find node_modules -maxdepth 1 -type d -empty -delete
cp -r node_modules "$nodeModulesPath"