Re:GitHub Package Registry
by andreineculau on Saturday May 11, 2019 @08:02AM
(#19885746)
Not big challenges though.
A simple tool like https://github.com/andreineculau/npm-publish-git does the job (it's regularly used and tested within my current company TobiiPro https://github.com/tobiipro).
We publish npm packages to git tags that get installed exactly the same as packages received from a registry, no build step necessary.
There are some challenges, though. If the repository requires a build step to derive a package from it then the author has to provide the proper package.json lifecycle hooks, e.g. a prepare script. Also, there's presently no git/hub-install support for a package nested inside a monorepo.
¹ https://docs.npmjs.com/files/package.json#git-urls-as-depend...
² https://docs.npmjs.com/files/package.json#github-urls