dmitrijivanenko/hotrod-cli

Magento 2 code generation cli tool

0.0.4 2018-09-11 13:14 UTC

README

68747470733a2f2f646d697472696a6976616e656e6b6f2e6769746875622e696f2f686f74726f642d636c692f696d672f686f74726f64636c692e6a7067

Scrutinizer Code Quality Build Status codecov Join the chat at https://gitter.im/hotrod-cli/Lobby

This package helps you generate Magento 2 code using a clean commandline tool. All classes, templates, layouts and etc. can be dynamically generated and put together.

Features

  • Generates different kind of magento 2 module components
  • has a build in UI
  • Easy to start using

68747470733a2f2f646d697472696a6976616e656e6b6f2e6769746875622e696f2f686f74726f642d636c692f696d672f73637265656e732e706e67

Documentation

You'll find full documentation here.

Example

Lets review an example

vendor/bin/hotrod create:controller Dmiva_Test dmiva/testing/test

This line tries to create a controller for the route dmiva/testing/test in Dmiva_Test namespace. Magically it creates for You a module Dmiva_Test if it is not exists and generates files :

  • app/code/Dmiva/Test/registration.php
  • app/code/Dmiva/Test/etc/module.xml
  • app/code/Dmiva/Test/etc/frontend/routes.xml
  • app/code/Dmiva/Test/view/frontend/layout/dmiva_testing_test.xml
  • app/code/Dmiva/Test/Controller/Testing/Test.php
  • app/code/Dmiva/Test/Block/Testing.php
  • app/code/Dmiva/Test/view/frontend/templates/test.phtml

To open the User Interface, run this command

vendor/bin/hotrod-ui

It will build the Angular app and run the basic build in php server on http://localhost:8008/.

Installation

You can install the package via composer:

composer require --dev dmitrijivanenko/hotrod-cli

Contributing

Help is very welcomed. We accept contributions via Pull Requests on Github. Please read and understand the contribution guide before creating an issue or pull request.

Licence

This project is open-sourced software licensed under the MIT license.