1 # shellcheck shell=bash
3 nodejsInstallManuals
() {
4 local -r packageJson
="${1-./package.json}"
6 local -r packageOut
="$out/lib/node_modules/$(@jq@ --raw-output '.name' package.json)"
8 while IFS
= read -r man
; do
9 installManPage
"$packageOut/$man"
10 done < <(@jq@
--raw-output '(.man | type) as $typ | if $typ == "string" then .man
11 elif $typ == "list" then .man | join("\n")
12 elif $typ == "null" then empty
13 else "invalid type " + $typ | halt_error end' "$packageJson")