The npm community forum has been discontinued.
To discuss usage of npm, visit the GitHub Support Community.
How to get `package.json` link from the registry – by using a shell script?
I want to extend a Zsh plugin manager (Zplugin) with support for keeping the plugins inside the registry. Specifically, a plugin is installed by preceding it with a list of so called ice-modifiers, e.g.:
# fzy zplugin ice wait"1" lucid as"program" pick"$ZPFX/bin/fzy*" \ atclone"cp contrib/fzy-* $ZPFX/bin/" \ make"!PREFIX=$ZPFX install" zplugin light jhawthorn/fzy
The point is that by storing a Zsh plugin definition in the registry it would be possible to store the ice-lists in the …
package.json, probably, in some custom field. This way the user could simply
zplugin registry fzy and the predefined, standard ice-list would be pulled.
However, how to get the following data from the registry – by using a shell script? I.e.:
- How to get
- How to get the link to the original repository of the project?
UPDATE: I can see that getting the
package.json (I’m not sure if it’s exactly that, rather not?) is as easy as
curl https://registry.npmjs.org/./PACKAGE-NAME, and that the output can be then passed to e.g.:
I wonder if the registry can also store tarballs? Because it seems to, the returned json contains e.g.:
Can a different format than JSON be requested?