An open API service indexing awesome lists of open source software.

https://github.com/staempfli/universal-code-generator

Universal code generator used as base to create framework specific code generators
https://github.com/staempfli/universal-code-generator

Last synced: 7 months ago
JSON representation

Universal code generator used as base to create framework specific code generators

Awesome Lists containing this project

README

          

# Universal Code Generator Tool

[![Project Status: Abandoned – Initial development has started, but there has not yet been a stable, usable release; the project has been abandoned and the author(s) do not intend on continuing development.](http://www.repostatus.org/badges/latest/abandoned.svg)](http://www.repostatus.org/#abandoned)

This tool can be used as base for creating code generators for specific frameworks

## Usage

0. Create your own generator project:

* Check an example here: [magento2-code-generator](https://github.com/staempfli/magento2-code-generator)

0. Add this project as dependency

```
composer require "staempfli/universal-code-generator":"~1.0"
composer update
```

0. Copy needed default configuration file

* `$ cp vendor/staempfli/universal-code-generator/config/default-properties.yml.dist config/default-properties.yml`

0. You need to create a PHP script to define the console application:

* We recommend to do that into the `bin` folder

`cd bin && vim `

* Add the following content to this file:
```
#!/usr/bin/env php
addGeneratorCommand
*/
// $application->addGeneratorCommand('template:generate', 'VendorName\ProjectName\Command\TemplateGenerateCommand');

$application->run();
```

0. Usually you might want to extend the default `template:generate` command. You can do that as follows:

* [Extend Template Generate Command](docs/extend-generate-command.md)

0. Create the templates that will be generated:

* [How to create templates](docs/createTemplates.md)

## Prerequisites

- PHP >= 5.6.*

## Developers

* [Juan Alonso](https://github.com/jalogut)

Licence
-------
[GNU General Public License, version 3 (GPLv3)](http://opensource.org/licenses/gpl-3.0)

Copyright
---------
(c) 2016 Staempfli AG