Documentation
    Preparing search index...

    Interface PakkContext

    interface PakkContext {
        allWorkspacePackages: WorkspacePackage[];
        cwd?: string;
        fileName?: (format: ModuleFormat, entryName: string) => string;
        formats: LibraryFormats[];
        logger?: Logger<unknown>;
        outDir?: string;
        packageType: NonNullable<undefined | "module" | "commonjs">;
        primaryFormat: LibraryFormats;
        rootWorkspacePackage: RootWorkspacePackage;
        srcDir?: string;
        workspacePackage: RegularWorkspacePackage;
    }

    Hierarchy

    • CurrentWorkspacePackageWithRoot
    • CwdOption
    • LoggerOption
      • PakkContext
    Index

    Properties

    allWorkspacePackages: WorkspacePackage[]
    cwd?: string

    Current working directory

    process.cwd()
    
    fileName?: (format: ModuleFormat, entryName: string) => string
    formats: LibraryFormats[]
    logger?: Logger<unknown>

    An optional Logger target.

    undefined
    
    outDir?: string

    the expected output directory relative to the package's directory.

    'dist'
    
    packageType: NonNullable<undefined | "module" | "commonjs">
    primaryFormat: LibraryFormats

    Will depend on the "type" field in the packageJson file. 'es' if 'module', 'cjs' otherwise.

    rootWorkspacePackage: RootWorkspacePackage
    srcDir?: string

    source root, relative to cwd

    'src'
    
    workspacePackage: RegularWorkspacePackage