npmHooks.npmInstallHook: ignore rather than error for missing bin/man keys in package.json
This commit is contained in:
parent
fdbdb2d282
commit
8999c9d930
@ -30,12 +30,14 @@ npmInstallHook() {
|
|||||||
done < <(@jq@ --raw-output '(.bin | type) as $typ | if $typ == "string" then
|
done < <(@jq@ --raw-output '(.bin | type) as $typ | if $typ == "string" then
|
||||||
.name + " " + .bin
|
.name + " " + .bin
|
||||||
elif $typ == "object" then .bin | to_entries | map(.key + " " + .value) | join("\n")
|
elif $typ == "object" then .bin | to_entries | map(.key + " " + .value) | join("\n")
|
||||||
|
elif $typ == "null" then empty
|
||||||
else "invalid type " + $typ | halt_error end' "${npmWorkspace-.}/package.json")
|
else "invalid type " + $typ | halt_error end' "${npmWorkspace-.}/package.json")
|
||||||
|
|
||||||
while IFS= read -r man; do
|
while IFS= read -r man; do
|
||||||
installManPage "$packageOut/$man"
|
installManPage "$packageOut/$man"
|
||||||
done < <(@jq@ --raw-output '(.man | type) as $typ | if $typ == "string" then .man
|
done < <(@jq@ --raw-output '(.man | type) as $typ | if $typ == "string" then .man
|
||||||
elif $typ == "list" then .man | join("\n")
|
elif $typ == "list" then .man | join("\n")
|
||||||
|
elif $typ == "null" then empty
|
||||||
else "invalid type " + $typ | halt_error end' "${npmWorkspace-.}/package.json")
|
else "invalid type " + $typ | halt_error end' "${npmWorkspace-.}/package.json")
|
||||||
|
|
||||||
local -r nodeModulesPath="$packageOut/node_modules"
|
local -r nodeModulesPath="$packageOut/node_modules"
|
||||||
|
Loading…
Reference in New Issue
Block a user