Skip to content
velt/package exports

velt/package

API reference

The 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.

import type { Package } from "velt/package";

Exports

Re-exported from velt/package/manifest

type Build = { cpu?: string }

How a package's program is built (docs/tooling/platforms.md "CPU").

Re-exported from velt/package/manifest

type Dependency = string | DependencySource

A dependency: a semver requirement such as "^1.2", or where to get it.

type

DependencySource

#std/package/manifest.vlt:55

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.

Re-exported from velt/package/manifest

type Jsx = { importSource?: string }

JSX settings of a package.

Re-exported from velt/package/manifest

type Native = { path?: string; targets?: string[]; wasm?: boolean }

A package's native library (docs/book/native-packages.md).

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.