I stumbled on this solution to a problem I didn't even know I had! I wanted to fork and modify an NPM package that's in the subdirectory of a monorepo. But NPM (the tool) can't directly import from a git subdirectory, it has to be imported via NPM (the package repository).
One solution would be to make your own package repository on GH and publish the fork there, but that's a big hassle. With GitPkg it's a one-liner in your package.json.
Peeking at the source code, very interesting implementation too, with streaming tar files. That helps explain how a service like this can be provided for free.
1 comment
[ 3.4 ms ] story [ 100 ms ] threadOne solution would be to make your own package repository on GH and publish the fork there, but that's a big hassle. With GitPkg it's a one-liner in your package.json.
Peeking at the source code, very interesting implementation too, with streaming tar files. That helps explain how a service like this can be provided for free.
(Looks unrelated to this "gitpkg" from a few years back: https://news.ycombinator.com/item?id=18009759)