Skip to main content

resolveExportPaths

Expand %NAME%, $NAME and ${NAME}, then resolve destinations relative to the project.

Import​

import { resolveExportPaths } from '@bedrock-core/builder/export';

Signature​

function resolveExportPaths(project: string, packs: Record<string, string>, selection: Record<string, string>, environment: NodeJS.ProcessEnv = process.env): Record<string, string>;

Parameters​

ParameterTypeDefaultDescription
projectstring—Absolute directory containing config.json
packsRecord<string, string>—Configured pack IDs mapped to their directories
selectionRecord<string, string>—Destination for every configured pack ID
environmentNodeJS.ProcessEnvprocess.envVariable values; defaults to process.env

Returns​

Absolute destinations without creating directories or publishing files.

Notes​

Supports %NAME%, $NAME and ${NAME}. Environment names are case-insensitive on Windows. Missing variables, pack destinations and unsafe overlaps fail.