Requires nodejs
Usage:
# extend-json <target-path> <source-path>
extend-json a/package.json b/package.json > a/package.json
| #!/bin/bash | |
| TARGET=$(tr -d '\n' < $1) | |
| SOURCE=$(tr -d '\n' < $2) | |
| node -e "console.log(JSON.stringify(Object.assign($TARGET, $SOURCE), false, 4))" |