Open nkuba opened 4 years ago
Notably, npm link
creates a global link. That is, if someone wants a local setup working on two versions, they'd have to run the linking step when switching. Using file paths is more brittle to where the repos are with respect to each other, but it is a local link, so if you're maintaining two repo clones with distinct artifact states, as long as they're on the same chain, you can switch between them without modifying anything.
Just food for thought here---I have a mild bias for using a directory reference vs npm link
for this reason, but it may not ultimately apply in the context of everything else we do.
Currently, we've got multiple ways of linking packages between local repos:
npm link
https://github.com/keep-network/local-setup/blob/d29abdf4e95b97815d09a107c7b0e2e9ed2c6cd6/install-keep-dashboard.sh#L37-L51Replacing
node_modules
content https://github.com/keep-network/local-setup/blob/d29abdf4e95b97815d09a107c7b0e2e9ed2c6cd6/install-keep-ecdsa.sh#L52-L53Replacing the dependency path in
package.json
https://github.com/keep-network/local-setup/blob/d29abdf4e95b97815d09a107c7b0e2e9ed2c6cd6/install-tbtc-dapp.sh#L32We should be consistent across install scripts (preferably use the first way).