UNPKG

@pakk/core

Version:

The core library of pakk, that can manage your package.json for library development.

40 lines 1.7 kB
import { Defined } from '@alexaegis/common'; import { AllBinPathCombinations } from '../../bin/auto-bin.class.js'; import { AllExportPathCombinations } from '../auto-export.class.js'; import { EntryPathVariantMap } from '../export-map.type.js'; export interface CreateExportMapFromPathsOptions { /** * Where the paths were searched from, can be extended further using * the basepath. */ srcDir: string; /** * Where the bundler will place the resulting files */ outDir: string; /** * The directory where shims for the bins are placed */ shimDir?: string; /** * A path every other path was search from, so in the result they will * be prefixed with this * * @defaultValue '.' */ basePath?: string; /** * What kind of keys shall the resulting object contain? * - If set to 'extensionless-relative-path-from-base' then the keys will * equal to the input paths minus the extension * - If set to 'extensionless-filename-only' then the keys will be set to * the filename only. */ keyKind: 'extensionless-relative-path-from-base' | 'extensionless-filename-only'; } export type NormalizedCreateExportMapFromPathsOptions = Defined<CreateExportMapFromPathsOptions>; /** * The resulting paths still contain their original extensions. */ export declare const createExportMapFromPaths: <Variants extends AllExportPathCombinations | AllBinPathCombinations = AllExportPathCombinations | AllBinPathCombinations>(pathsFromBase: string[], options: CreateExportMapFromPathsOptions) => EntryPathVariantMap<Variants>; //# sourceMappingURL=create-export-map-from-paths.function.d.ts.map