Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Create a paclet layout from a collection of files, symbols and contexts
ResourceFunction["Pacletize"][name,content] creates a Wolfram Language paclet from the specified content and returns the directory name. | |
ResourceFunction["Pacletize"][name, content, location] stores the paclet in the specified directory. |
| File[…] | local file or directory containing code package files |
| "context`" | context with symbol definitions |
| "name" | symbol name with definitions |
Create a paclet from a function:
| In[1]:= |
| Out[1]= |
Clear the local function definition and add register the paclet:
| In[2]:= |
The function will autoload the paclet and work:
| In[3]:= |
| Out[3]= |
Create a paclet layout in a specific location:
| In[4]:= |
| Out[4]= |
| In[5]:= |
I made this on the spookiest day:
| In[6]:= |
| Out[6]= |
Paclets can be defined for a context. First define symbols in a new context:
| In[7]:= | ![]() |
Create the paclet directory:
| In[8]:= |
| Out[8]= |
Clear the local definitions and add the paclet:
| In[9]:= |
Getting the context will load the paclet:
| In[10]:= |
The code is defined:
| In[11]:= |
| Out[11]= | ![]() |
| In[12]:= |
| Out[12]= | ![]() |
Store some code and data in a package file:
| In[13]:= | ![]() |
Create a paclet directory including that file:
| In[14]:= |
Clear the definitions and add the paclet directory:
| In[15]:= |
Load the paclet context:
| In[16]:= |
| In[17]:= |
| Out[17]= |
Create a directory with many code files:
| In[18]:= |
| In[19]:= | ![]() |
| Out[19]= |
Create a paclet directory including those files:
| In[20]:= |
Clear the definitions and add the paclet directory:
| In[21]:= |
Load the paclet context:
| In[22]:= |
| In[23]:= |
| Out[23]= |
The created paclet directory contains several files:
| In[24]:= | ![]() |
| Out[24]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License