UNPKG

@pakk/core

Version:

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

37 lines 1.98 kB
import { PackageJson } from '@alexaegis/workspace-tools'; import { PackageExaminationResult, PakkFeature } from '../pakk-feature.type.js'; import { LibraryFormats } from 'vite'; import { NormalizedPakkContext } from '../../internal/pakk.class.options.js'; import { PathMap } from '../../package-json/index.js'; import { AutoExportOptions } from './auto-export.class.options.js'; import { PackageExportPathContext } from './package-export-path-context.interface.js'; export declare const allExportPathCombinations: readonly ["development-to-source", "development-to-dist", "distribution-to-dist"]; export type AllExportPathCombinations = (typeof allExportPathCombinations)[number]; export type ExportPathMap = PathMap<AllExportPathCombinations>; export type ExportTargetFileFormats = LibraryFormats; /** * Generates exports entries automatically */ export declare class AutoExport implements PakkFeature { readonly order = 1; private readonly options; private readonly context; private exportMap; constructor(context: NormalizedPakkContext, options?: AutoExportOptions); examinePackage(_packageJson: PackageJson): Promise<Partial<PackageExaminationResult>>; /** * This plugin compiles the exports object for a packageJson file * * For the distributed packageJson it should always contain paths that are * targeting the dist folder from the dist folder. * * For development packageJson the types always target the source for * immediate feedback by the LSP by local consumers of the package. * The actual code that's being imported by node has two options, * by default they target the outDir and expect libraries to be built * before actually running them in a local setting. * There's an alternative mode however that will target the source files. */ process(_packageJson: PackageJson, pathContext: PackageExportPathContext): PackageJson; } //# sourceMappingURL=auto-export.class.d.ts.map