nsuite - v1.0.1
    Preparing search index...

    Function zipFile

    • Zips a single file and returns a promise that resolves when the zip operation is complete.

      Parameters

      • options: { pathInputFile: string; pathOutputFile: string }

        The options for the zip operation.

        • pathInputFile: string

          The path to the input file to be zipped.

        • pathOutputFile: string

          The path to the output zip file.

      Returns Promise<number>

      • A promise that resolves with final zip file size in Bytes when the zip operation is complete.
      import { zipFile } from "nsuite";
      await zipFile({
      pathInputFile: "./package.json",
      pathOutputFile: "./package.json.zip",
      });