CreatePacletArchive

CreatePacletArchive[source]

creates a paclet archive file from source.

CreatePacletArchive[source,destdir]

creates a paclet archive file from source and places it in destdir.

Details

  • CreatePacletArchive returns the full path to the created paclet archive file, or $Failed if there is an error.
  • The source specification can be any of the following:
  • "source"explicit path to a paclet directory
    File[]reference to a paclet directory
    {source1,source2,}a list of files or directories
  • The name of the paclet archive file is automatically generated from the paclet name and version number, and ends in .paclet.
  • One of the directories being packed must contain a proper paclet descriptor file (PacletInfo.wl or PacletInfo.m).
  • When using CreatePacletArchive[dir], the created paclet archive file is placed next to dir.
  • CreatePacletArchive uses ZIP compression, and paclet archive files can be inspected with ZIP-based tools.
  • CreatePacletArchive does not delete the source files or directories.
  • You can use paclet archive files as a convenient means of sharing paclets with others or for deploying to a paclet server.
  • Use PacletInstall to install paclet archive (.paclet) files on your system.

Examples

open allclose all

Basic Examples  (1)

Create a trivial paclet in a temporary directory:

Compress it into a .paclet file that can easily be distributed:

Properties & Relations  (1)

ExtractPacletArchive can be used to unpack a .paclet file created with CreatePacletArchive:

The .paclet file has been uncompressed to a directory containing the paclet's contents:

Introduced in 2020
 (12.1)