Abstract project entry configuration.

Entry type.

interface Generated {
    distFiles: Promise<DistFiles>;
    name: Promise<string>;
    sourceFile: Promise<string>;
    typesFile: Promise<string>;
    get hasDistFile(): boolean;
    get isGenerated(): Promise<boolean>;
    get path(): string;
    get project(): ProjectConfig;
    clone(): this;
    detectDistFiles(): Promise<null | DistFiles>;
    detectName(): Promise<null | string>;
    detectSourceFile(): Promise<null | string>;
    detectTypesFile(): Promise<null | string>;
    host(): ProjectPackage;
    package(): ProjectPackage;
    toGenerated(): Promise<undefined | Generated>;
    withDistFiles(distFiles: null | DistFiles): this;
    withName(name: string): this;
    withSourceFile(file: null | string): this;
    withTypesFile(file: string): this;
}

Hierarchy (view full)

Properties

distFiles: Promise<DistFiles>

Path to distribution files relative to distribution directory.

This is typically a file listed in package.json exports section and generated from source file.

May be null when distribution files missing.

name: Promise<string>

Short entry name.

By default, equals to distribution file path relative to * distribution directory without an extension.

May be null for non-generated entries.

sourceFile: Promise<string>

Path to source file to transpile during the build relative to sources directory, or null if this entry is not transpiled.

By default, searches for main.(m|c)?ts, mod.(m|c)?ts, or index.(m|c)?ts file in sources sub-directory corresponding to export path of the entry.

For example:

  • . converted to ./src/mod.ts,
  • ./util converted to ./src/util/mod.ts.
typesFile: Promise<string>

Path to types definition file relative to distribution directory.

By default, equals to entry name with .d.ts extension.

May be null for non-generated file.

Accessors

Methods