velt/package
API referenceThe type of the package manifest, package.vlt, and of the workspace manifest, velt.workspace.vlt. The module contains only types; nothing imports it at run time. For a walkthrough, read the guide.
Exports
"^1.2", or where to get it.DependencySourceWhere a dependency comes from: a registry version, a local directory, a git repository, or a version and one of the others.JsxJSX settings of a package.NativeA package's native library (docs/book/native-packages.md).PackageA package manifest: the one export const pkg: Package = { … } of a package.vlt.WorkspaceA workspace: the one export const workspace: Workspace = { … } of a velt.workspace.vlt at a repository's root (docs/tooling/packages.md "Workspaces").Re-exported from velt/package/manifest
type Build = { cpu?: string }How a package's program is built (docs/tooling/platforms.md "CPU").
Used byPackage
Re-exported from velt/package/manifest
type Dependency = string | DependencySourceA dependency: a semver requirement such as "^1.2", or where to get it.
Re-exported from velt/package/manifest
type DependencySource = { version?: string; path?: string; git?: string; branch?: string; tag?: string; rev?: string }Where a dependency comes from: a registry version, a local directory, a git repository, or a version and one of the others.
Used byDependency
Re-exported from velt/package/manifest
type Jsx = { importSource?: string }JSX settings of a package.
Used byPackage
Re-exported from velt/package/manifest
type Native = { path?: string; targets?: string[]; wasm?: boolean }A package's native library (docs/book/native-packages.md).
Used byPackage
Re-exported from velt/package/manifest
type Package = { name: string; version: string; velt?: string; description?: string; keywords?: string[]; entry?: string; registry?: string; dependencies?: Record<string, Dependency>; paths?: Record<string, string>; jsx?: Jsx; define?: Record<string, string>; native?: Native; tsCompat?: string[]; build?: Build }A package manifest: the one export const pkg: Package = { … } of a package.vlt.
Re-exported from velt/package/workspace
type Workspace = { members: string[]; velt?: string; registry?: string; dependencies?: Record<string, Dependency> }A workspace: the one export const workspace: Workspace = { … } of a velt.workspace.vlt at
a repository's root (docs/tooling/packages.md "Workspaces"). Its members share one
velt.lock.json, velt and registry.