JS Utils Kit - v0.1.0
    Preparing search index...

    Function createArchive

    • Creates a ArchiveFormat archive from a specified directory.

      This function uses the archiver library to package a directory into an archive file. It supports optional compression for zip and returns a Promise that resolves when the archive is successfully created.

      Parameters

      Returns Promise<void>

      A Promise that resolves when the archive is created

      Function usage:

      await createArchive({
      format: "zip",
      source: "dist/",
      destination: "dist.zip",
      });

      CLI usage:

      npx js-utils-kit createArchive -f zip -s dist -d dist.zip
      

      If an error occurs during the archiving process