banira
    Preparing search index...

    Function linkManifestField

    • Points a package's package.json customElements field at a generated manifest — the convention IDEs (VS Code, JetBrains) and Storybook use to auto-discover a package's Custom Elements Manifest.

      Resolves the nearest package.json above the manifest, writes the field as a POSIX path relative to that package root, and preserves the file's existing indentation and trailing newline. A no-op (changed: false) when the field already points at the same file.

      Parameters

      • manifestPath: string

        Path to the written manifest (e.g. custom-elements.json).

      • OptionalstartDir: string

        Where to begin the upward search (defaults to the manifest's directory).

      Returns LinkManifestResult

      Error if no package.json is found.