This page will explain the basic structure of packages, including how to develop and publish them. You can easily develop packages that consist of any functionality you desire, then have the freedom to instantly install, remove and upgrade those packages on systems throughout the internet, and have them simply work right out of the box. You can list and sell packages on our marketplace, open source them by publishing them to our public repository, or even start your own private repository and keep them private for your commercial clients.
You can easily create a new package any time. Within terminal change to the Apex installation directory, and type:
Each package contains a few sub-directories as described in the below table.
This directory holds configuration and installation details on each package. Below lists all files within this directory:
package.php Configuration File
This is the main configuration file for the package, and defines various basic properties such as name and access level, configuration variables, hashes, menus to add, and more. Due to the size of this file, a separate page has been devoted to it, and for full details please visit the Package Configuration page.
Develop the Package
Now that the package has been created, go ahead and develop it by adding all the desired libraries, views, components and unit tests. For a quick example of how to add a library and view to the package "casino", at terminal you could type:
The above commands would add the components, and create the necessary blank files for you to develop. For details on all supported components, and how to create / delete them, please visit the following links:
Once development is complete, it is very easy to publish your package to a repository. If you do not wish to publish to the main public Apex repository, manage the package via the Devel Kit->Packages menu of the administration panel, and change the repository assigned to the package. If you wish to upload to your own private repository, please see the Repositories page of this documentation.
To publish your package, in terminal change to the installation directory, and type:
That's it. The package will then be published to the repository, and can then be installed on any Apex system by typing:
Need a Professional?
Need development work by the creator of Apex? E-mail firstname.lastname@example.org for a free consultation.
Subscribe to the low traffic mailing list to stay updated on Apex.