@electron/packager
    Preparing search index...

    Type Alias SanitizePackageJsonFunction

    SanitizePackageJsonFunction: (
        packageJson: Record<string, unknown>,
        electronVersion: string,
        platform: OfficialPlatform,
        arch: OfficialArch,
    ) => Record<string, unknown> | Promise<Record<string, unknown>>

    A function that receives the parsed contents of the bundled app's package.json and returns the object that will be written back to disk. Mutating and returning the received object is fine. May be asynchronous.

    The functions in the sanitizePackageJson array run serially, and each function receives the object returned by the previous one.

    Type Declaration

      • (
            packageJson: Record<string, unknown>,
            electronVersion: string,
            platform: OfficialPlatform,
            arch: OfficialArch,
        ): Record<string, unknown> | Promise<Record<string, unknown>>
      • Parameters

        • packageJson: Record<string, unknown>

          The parsed package.json contents. For the first function in the array, the contents as copied into the bundled app; for subsequent functions, the object returned by the previous function.

        • electronVersion: string

          The version of Electron that is being bundled with the application.

        • platform: OfficialPlatform

          The target platform you are packaging for.

        • arch: OfficialArch

          The target architecture you are packaging for.

        Returns Record<string, unknown> | Promise<Record<string, unknown>>