A component generator for Yeoman.
Using this generator, you can quickly and effortlessly scaffold out a new joomla component, using recommended MVC design pattern and coding standards. These include:
- Internationalization language files
- Tabs for indents
- CamelCase variable notation
- Proper MVC architecture
- PHPDocumentor stubs for every method, as well as page-level doc blocks
- Uses
'
over"
, because that's what the official Joomla library uses
So rather than manually creating your own config.xml
and other config files, you just need to load up this generator, type in your options, and everything is set up for you. If you want to add a new model, view, or controller, just use the subgenerators!
Trick question. It's not a thing. It's this guy:
Basically, he wears a top hat, lives in your computer, and waits for you to tell him what kind of application you wish to create.
Not every new computer comes with a Yeoman pre-installed. He lives in the npm package repository. You only have to ask for him once, then he packs up and moves into your hard drive. Make sure you clean up, he likes new and shiny things.
$ npm install -g yo
Yeoman travels light. He didn't pack any generators when he moved in. You can think of a generator like a plug-in. You get to choose what type of application you wish to create, such as a Backbone application or even a Chrome extension.
To install generator-joomla-component from npm, run:
$ npm install -g generator-joomla-component
Finally, initiate the generator:
$ yo joomla-component
There are currently 4 subgenerators:
- model:
yo joomla-component:model "model-name"
- view:
yo joomla-component:view "view-name"
- controller:
yo joomla-component:controller "controller-name"
- helper:
yo joomla-component:helper "helper-name"
Each generator creates a new file with phpdocumentor and joomla standards, packaged and subpackaged as needed
The components and starting logic are derived form the book Learning Joomla 3 Extension Development Third Edition (you can also find this on other alternative locations on the internet by googling)