Downloads the latest pact binary via wget & curl. Both wget and curl work well with corporate firewalls and proxy settings; assuming you have your system propery configured.
- Add this file to your repo under a scripts folder.
- Run
yarn add -D shelljs pino
(NOTE if you wish to not have pino, it can be stripped out) - Run
node ./scripts/pact-download.js
- Add the following portion to your
package.json
"config": {
"pact_binary_location": "./tmp/pact"
}
- Run a yarn
Now you can add pact via yarn and node have to worry about it erroring out. Example:
yarn add -D jest-pact @pact-foundation/pact