Writing recipes
This page contains AI-generated content.
A recipe is a JSON file that says where to get packages, and how to fix them up into VPM packages. Vpmify reads the recipe and makes the lists of the versions of the packages. For the versions the user chooses, it converts the original packages into VPM packages, and registers them with ALCOM.
An example recipe
This is a simple recipe that offers a package of OpenUPM as a VPM package, as it is.
{
"vpmifyFormat": 1,
"url": "https://example.com/com.example.needle-deeplink.json",
"id": "com.example.needle-deeplink",
"displayName": "Needle Deeplink",
"sources": [
{
"type": "npm",
"registry": "https://package.openupm.com",
"packages": [
{ "name": "com.needle.deeplink" }
]
}
]
}
vpmifyFormat: the format of the recipe itself. It is1.url: (optional) the URL where the recipe is published.id: the identifier of the recipe. Write it in reverse domain name notation, as the ids of VPM repositories are. It takes lowercase letters, digits,.,_and-.displayName: the name of the recipe.sources: where to get the packages.- When
"type"is"npm", it is an npm source. - When
"type"is"github", it is a GitHub source.
- When
Trying a recipe
vpmify recipe add ./my-recipe.json
vpmify recipe versions --all com.example.needle-deeplink
vpmify package pull com.example.needle-deeplink
recipe addadds the recipe.recipe versions --allshows the versions in the recipe.package pullregisters the newest version of each package in the recipe with ALCOM. To name a version, write it likepackage pull com.example.needle-deeplink@1.2.3.
To make Vpmify read a local recipe again after you change it, follow the steps above again.
Sharing a recipe
Put the recipe on the web to share it with others.
A link of the form vpmify://recipe/add?url=<https URL of the recipe> adds it in the GUI.