Skip to content

PromptScript API


Function: createVendorRegistry()

createVendorRegistry(vendorDir): VendorRegistry

Defined in: resolver/src/vendor-registry.ts:89

Create a VendorRegistry backed by the given directory.

Parameters

vendorDir

string

Absolute path to the vendor directory

Returns

VendorRegistry

VendorRegistry instance

Example

import { createVendorRegistry } from '@promptscript/resolver';

const vendor = createVendorRegistry('/project/.promptscript/vendor');
const content = await vendor.fetch('@company/base.prs');