pm.ts

Source

3 documented symbols. Read the signatures first, then expand each item for parameters, return types, and examples.

3 symbols 1 functions 1 interfaces 1 modules 2 parameters 1 members 1 returns

Reference

modulepmPackage Manager Tabs Plugin Transforms <pm>npm install …</pm> blocks into a tab group with one tab per package manager…

Package Manager Tabs Plugin

Transforms <pm>npm install …</pm> blocks into a tab group with one tab per package manager (npm/pnpm/yarn/bun). The single npm-style command is converted to each package manager's equivalent natively in Rust (transformPmEmbeds in

View source

interfacePmOptionsOptions for transformPm.

Options for transformPm.

Signature

export interface PmOptions

View source

Members

Properties
NameTypeDescription
syncoptional boolean
Enable opt-in synced package-manager tab groups. When true, a
data-ox-tab-group="pkg-manager" attribute is emitted so the client runtime
syncs the active package manager across every pm group on the page and
persists the choice in localStorage.
Default false
fntransformPm(html: string, options?: PmOptions): Promise<string>Transform <pm> package-manager blocks in HTML into install tabs.

Transform <pm> package-manager blocks in HTML into install tabs.

Signature

export async function transformPm(html: string, options?: PmOptions): Promise<string>

View source

Parameters

  • html string

    Rendered HTML potentially containing <pm> blocks.

  • options PmOptions

    Package-manager tab options (syncing is opt-in). — optional

Returns

Promise<string>

The rewritten HTML.