Skip to content
HomePagesHomePages template kit
Menu

template-kit pack

The `template-kit pack` command — what it produces, what it refuses, and why.

Build a template’s submission artifact: a zip of the template’s source plus the workspace lockfile, validated and stamped.

Terminal window
template-kit pack <template>

Run it from the workspace root, or from inside a template folder (the template is inferred). In a workspace with several templates you must name one — the submission unit is a single template.

<template>.zip at the workspace root, containing:

  • pack-manifest.json — the exact kit version the source was validated against, a content hash of the template tree, the pack timestamp, and a check flag recording that validation passed.
  • package.json and package-lock.json from the workspace root, so the build is reproducible with npm ci.
  • templates/<template>/ — the template’s source only (sections, manifest, theme, README). No node_modules, no build output, no other template.

pack will not produce a zip when:

  • check <template> is not green — fix the reported problems first.
  • the workspace has no package-lock.json — run npm install and commit it.
  • a dependency uses a local file:/link: protocol — depend on published versions.

Fix the reported cause and run it again.

  • Check — the gate pack runs before it will produce a zip.