After many years of build extensions for Joomla with traditional tools like bash scripts or Phing, I have started a project Extly's Buildfiles for Joomla to modernize my personal Toolbox for Joomla extension development: anibalsanchez/extly-buildfiles-for-joomla.
At this time, JavaScript is a dominant driven force in all of my projects. So, seamless integration between PHP and JavaScript ecosystems is the best approach. So, the build scripts are mainly based on JavaScript dev tools to integrate modern PHP and Joomla development.
The key features of the project are:
- Powered by Webpack to build and support the development workflow
- Support for any type of Joomla extension: component, CLI files, template, etc.
- Flexibility, to exclude and customize the package merely deleting folders or customizing the build template files.
- Template files to create the manifests
- Translation files to automate the translation management.
- A Library, to pack Composer libraries or any other library.
- Support of mobile apps, progressive apps or single page apps (App folder)
When the project started, I forked it from joomla-extensions/boilerplate, with the idea of submitting a PR to improve the original project. However, the addition of scripts to manage the package and control the extension has increased the complexity beyond what a user would expect from a boilerplate project.
To sum up, I have already migrated more than 20 extensions to the new organization, and the build files are supporting well the development process. The experience confirms that it is possible to integrate JavaScript and PHP in the creation of a single ecosystem. Both technologies can stand at the same level and be complementary to evolve together. The next logical steps are going to be the migration of the rest of my extensions and the implementation of build server based on these build files.
Feel free to clone, fork, use it or propose improvements. To the moon!