@oazmi/superbuild - v0.1.0
    Preparing search index...

    Implements

    Index

    Constructors

    Properties

    outputPath: string

    the absolute output path of this resource entity.

    initialPath?: string

    if this resource entity was renamed during the , emission stage, then its original (absolute) outputPath will get saved here.

    hash?: string
    contents: Uint8Array<ArrayBuffer>
    write: boolean = true

    specify if this file entry should be written.

    true (i.e. it'll be written if EsbuildBuildOption.write is enabled, otherwise it won't be.)

    inputs: Readonly<BundledInputFile>[] = []

    an array of metadata on the loaded input files that were bundled into this physical output file entity.

    imports: Readonly<ImportedEntityNode<any>>[] = []

    an array of metadata on the output files that are imported by this file entity during runtime.

    each of these is basically associated with a js (import { x, y, z } from "abc"), css (@import url("./blahblah.css")), or user-import (i.e. OnTransformResult.imports) statement.

    metafile: Metafile

    Methods

    • scans esbuild's metafile outputs to find the input sources bundled into this output file. the input sources are presented with resolved path information, namespace, onEmit information, and other additional information acquired from the resource's resolver, loader, and transformer results. (the collection of this information is stored in metafile.resolvedResourceRegistry, which is inherited from the SuperBuildContext.)

      Returns Readonly<BundledInputFile>[]

    • scans esbuild's metafile outputs to find all file imports performed by this output file. these only include entity imports found by esbuild natively (js imports, css imports, etc...), and not long-build plugin based imports.

      Important

      this function should be run after all files have been added to your metafile via metafile.addFile, because the imports need to reference the OutputFileEntity associated with the imported file.

      Returns Readonly<ImportedEntityNode<any>>[]

    • perform onEmit action on this output file entity, based on the provided onEmit handlers.

      Parameters

      • on_emit_handlers: OnEmitHandler[]

      Returns Promise<OnEmitResult | undefined>

    • rename this file. you can either provide an absolute path, or a relative path. relative paths will be resolved with respect to the cwd or esbuild's absWorkingDir.

      Parameters

      • new_output_path: string

      Returns void

    • convert an output file entity to an esbuild-compatible output file description.

      (honestly, I don't see myself using it, and if we're overloading esbuild anyway, why don't we overload the OutputFile interface to include new fields, such as write and external, etc...?)

      Parameters

      • outdir: string = "./"

      Returns any