The Anatomy of a Package

This guide explains the structure of a Yak package.

Package Structure

Packages are simply ZIP archives. Take this simple example…

plankton-0.4.0.zip
├── manifest.yml
├── Plankton.gha
├── Plankton.dll
└── misc/
    ├── README.md
    └── LICENSE.txt

Important Things to Note

  1. Packages must have a top-level manifest.yml file. Details about the manifest can be found in the Manifest Reference Guide.
  2. Any plug-ins (.rhp, .gha, .ghpy files) must be in the top-level directory so that Rhino and Grasshopper can find and load them
  3. Each package should have only one plug-in (.gha, .rhp or .ghpy). It is possible to combine plug-ins in one package (e.g. .gha and .rhp) however package restore will only work for the plug-in which matches the details in the manifest.yml file.
  4. Versioning is critical to package management. The version number given to the package must adhere to SemVer 2.0.0. We’ve adopted SemVer to make ordering straightforward and also for easy identification of pre-release versions – handy when releasing beta plug-ins for limited testing! Please ask any questions about versioning on the Yak Forum.
  5. If you’re packaging a .gha plug-in, you should ensure that the package name and version number in the GH_AssemblyInfo sub-class match those in the manifest.yml file, otherwise package restore may not work

Next Steps

Now that you’ve have seen what is in a package, why not create a package: