Package Usage and Development » Overview

Paclets

As we discussed previously, paclets provide a way to distribute code, resources, and other things in Mathematica. They are the native format for this type of distribution and are tightly bound into the system.

Paclets can provide any or all of the following:

  • Code
  • Resources
  • Style Sheets
  • Palettes
  • Documentation

In general the most common thing we'll want to provide is code, but the others are common things to distribute as well.

Paclet Structure

A paclet provides any of the aforementioned components and then also provides a file PacletInfo.m that supplies metadata. At its absolute simplest this might look like:

 
  + PacletInfo.m 
  Kernel 
   + init.m 
  MyPaclet.m

This will then get distributed as a ZIP file with the extension .paclet and name MyPaclet-version.paclet where version is formatted for semantic versioning.

We can distribute paclets in a more sophisticated manner via a server, but we'll talk about that and paclet construction after we go over some more basic usage.

See Also: