Scaffolding for Joomla Extensions
npm install @dgrammatiko/create-joomla-extensionnpx @dgrammatiko/create-joomla-extensionuser-info.json could be copy/pasted in the same path)user-info.json has the following content (if accepting the defaults):``json`
{
"namespace": "Dgrammatiko",
"userName": "Dimitrios Grammatikogiannis",
"userEmail": "d.grammatiko@gmail.com",
"userURL": "https://dgrammatiko.dev",
"userLicense": "GNU General Public License version 3 or later",
"userCopyright": "(C) {{currentYear}} Dimitrios Grammatikogiannis"
}
- Following steps are:
- - Choose the extension type: Component, Module, Library, Plugin or Template
- - Modules and Templates need to be defined as Site or Administrator
- - Plugins need to be defined as their type, ie System, Content, etc
That's that. The extension basic files will be automatically created.
You can repeat the process to get more extensions...
Once you're ready you need to run npm install to get the needed tools.npm run init
Then
For the assets compilation/transpiling you could run npm run build && npm run link (npm run link is needed whenever more folders are introduced)
Finally run npm run release to get a distributable zip file.
--src (directory for the PHP files)
|
|-- components
| |
| |-- component xxx (com_xxx)
|
|-- libraries
| |
| |-- library yyy
|
|-- modules
| |
| |-- admin
| | |
| | |-- module zzz (mod_zzz)
| |
| |-- site
| |
| |-- module www (mod_www)
|
|-- plugins
| |
| |-- Type
| |
| |-- plugin uuu (plg_type_uuu)
|
|-- templates
| |
| |-- admin
| | |
| | |-- template aaa (tpl_aaa)
| |
| |-- site
| |
| |-- template bbb (tpl_bbb)
``