But Stripes is made up of several NPM packages: stripes-core, stripes-connect, and so on. And they use each other. In particular (let’s make things simple by picking a single example), stripes-core uses stripes-connect.
How can we run a development version of Stripes using only local git checkouts? It seems to me that this should be a very common pattern of usage, and there should be a well-known way of doing it — but if there is, we’ve not been able to find it.
What we’re doing makes us quite sad. We check out the two git modules stripes-core and stripes-connect next to each other in the same directory. Then we trick NPM so that when building stripes-core and pulling stripes-connect in from the @folio namespace, it gets it from the adjacent checkout:
$ cd stripes-core
$ mkdir -p node_modules/@folio
$ cd node_modules/@folio
$ ln -s ../../../stripes-connect
$ cd ../../
$ npm install
This works, but there are two problems:
- It’s horrible.
- It doesn’t work at all with Yarn, the NPM replacement that all the cool kids are using. (I don’t know why, I’ve not looked into it beyond just trying to run Yarn and seeing what happens.)
It’s left me feeling we must be missing something. This kind of hackery can’t be the best solution, can it? Surely we’re not the only people developing JS programs that consist of multiple modules? There has to be a standard way of doing this, right?
Does anyone know what it is? (Ideally a way that works with both NPM and Yarn.)