Developer's Guide
This guide covers how to create Pak packages, define export instructions, hook lifecycle events, and configure Pak behavior.
Topics
- Creating Packages — Define a
package.jsonfor your package, specify files, and configure exports - Package Events — Hook lifecycle events (preinstall, postcache, postinstall, etc.)
- Configuration — Configure Pak via
pakrcfiles andpackage.json
Package Structure
A Pak package is a directory with a package.json file at its root. At minimum it needs:
json
{
"name": "my-package",
"version": "1.0.0",
"description": "What this package does"
}Pak will always include package.json, README.md, and LICENSE when installing from a package.
Package Locations
| Path | Description |
|---|---|
~/.paks/NAME/OWNER/VERSION/ | Global cache |
paks/NAME/ | Installed in application |
lib/NAME/ | Exported runtime files |