![]() gitpackagemanagement.packages_dir (Packages directory) -› /modx/base/path/packages/.gitpackagemanagement.packages_base_url (Packages base URL) -› /packages/.It then stores these values in System Settings: Upon installation, GPM asks you to configure the packages path and url. ![]() gpmdoodles/ ‹- this will be a symlink to /path/to/git/repos/gpmdoodles/.packages/ ‹- from here, run ln -s /path/to/git/repos/gpmdoodles gpmdoodles.gpmdoodles/ ‹- local repo where you run git commands.Inside the packages/ folder you can symlink to your git repositories, if you store them in a different part of your filesystem. index.php ‹- default MODX gateway, shown here for illustrative purposes only.core/ ‹- default location relative to document root (you can customize this but unnecessary in local dev).You can develop an arbitrary number of Extras in the same environment, without having to reconfigure your directory structure. You only need to set this up once, when you install and configure GPM. This guide describes one such structure that has proven to work well, but you can choose whichever you prefer. There are multiple directory structures supported by GPM, as documented. While completely optional, it would not be frowned upon, to use the "Sponsor" button if you find this tutorial and the template helpful ) Getting Started Directory Structure You can actually clone or fork that repo and use it as a starting point for your Extra. The output of the steps in this guide are available in this repo on GitHub. The traditional way of doing that is documented in step 3 of the Doodles documentation. This post is about the packaging, or "build" step. NOTE: the "Doodles" documentation provides a dated-but-decent overview of how to develop a MODX Extra. In this post we'll refer to the classic MODX example Extra: "Doodles". While you could run GPM on a production MODX site, it's recommended to do this kind of thing on dev, away from prying eyes and expectations. An installation of MODX-usually this is in your local development environment.I probably would not be releasing MODX Extras at anywhere near the same rate without GPM.ĭespite some pretty good documentation however, the aforementioned Slack thread made it evident that a guide or tutorial for using GPM is needed. Luckily, there's a fantastic tool, Git Package Management ("GPM") made by Jan Peca, a prolific and talented MODX core team member. While reliable and effective, writing the build script can be a bit tiresome. MODX uses a purpose-built packaging format that pre-dates Composer. Arguably the most challenging part of building a MODX Extra is the actual packaging or "build" step. Recently some folks were asking about how to build a MODX Extra, in the community Slack.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |