PacletTools`
PacletTools`

CreatePaclet

CreatePaclet["name"]

creates a paclet directory called name in the current directory.

CreatePaclet[object]

creates a paclet directory structure corresponding to the specified PacletObject expression in the current directory.

CreatePaclet["name", dir]

creates a paclet directory called name in the directory dir.

CreatePaclet[object, dir]

creates a paclet directory structure corresponding to the specified PacletObject expression in the directory dir.

Details and Options

  • CreatePaclet creates a directory and generates an appropriate PacletInfo.wl for it.
  • CreatePaclet will create subdirectories corresponding to the specified paclet extensions, if appropriate.
  • Common PacletObject metadata fields can be passed as options to CreatePaclet, and are used to populate the generated PacletInfo.wl file. The following options are supported:
  • "Extensions"{"Kernel", "Documentation"}the set of paclet extensions provided by the new paclet
    "Version" "0.0.1"The initial "Version" number of the new paclet
    "WolframVersion" AutomaticThe initial "WolframVersion" requirement of the new paclet. Defaults to any version greater than or equal to $VersionNumber.
  • Paclets created by CreatePaclet are in a format incompatible with versions of the Wolfram Language prior to 12.1.

Examples

open allclose all

Basic Examples  (4)

Begin by ensuring PacletTools` is loaded:

Create a paclet with the default Kernel and Documentation extensions:

The new paclet directory contains the following files:

Access the location of the new paclet:

Create a paclet based on a PacletObject specification:

Create a paclet in the user home directory:

Options  (2)

"Version"  (1)

Create a paclet with the specified "Version" field:

"WolframVersion"  (1)

Create a paclet with the specified "WolframVersion" field:

Applications  (1)

Custom "Kernel" extension directory name  (1)

Create a paclet with a custom Kernel extension "Root" location:

A directory called Source will be made instead of Kernel:

Possible Issues  (1)

CreatePaclet[PacletObject[<| .. |>], ..] will return an error if any options are specified. This is to prevent ambiguity with keys within the association:

Wolfram Research (2020), CreatePaclet, Wolfram Language function, https://reference.wolfram.com/language/PacletTools/ref/CreatePaclet.html (updated 2021).

Text

Wolfram Research (2020), CreatePaclet, Wolfram Language function, https://reference.wolfram.com/language/PacletTools/ref/CreatePaclet.html (updated 2021).

CMS

Wolfram Language. 2020. "CreatePaclet." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2021. https://reference.wolfram.com/language/PacletTools/ref/CreatePaclet.html.

APA

Wolfram Language. (2020). CreatePaclet. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/PacletTools/ref/CreatePaclet.html

BibTeX

@misc{reference.wolfram_2024_createpaclet, author="Wolfram Research", title="{CreatePaclet}", year="2021", howpublished="\url{https://reference.wolfram.com/language/PacletTools/ref/CreatePaclet.html}", note=[Accessed: 15-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_createpaclet, organization={Wolfram Research}, title={CreatePaclet}, year={2021}, url={https://reference.wolfram.com/language/PacletTools/ref/CreatePaclet.html}, note=[Accessed: 15-November-2024 ]}