EvGen: Event Generator. Useful tools for making contracts between analysts and developers.
Supported languages
- swift
- java
- kotlin
- type_script
npm install -g evgen
- Create a folder with:
- events.yaml -- File with event specifications
- evgen.yaml -- Evgen config file
evgen --events_path events.yaml --evgen_config_path evgen.yaml
orevgen -e events.yaml -c evgen.yaml
- Without installing:
npx evgen -e events.yaml -c evgen.yaml
Examples of evgen.yaml can be found in tutorial/
Structure of evgen.yaml
code:
configName1:
platform: 'Android'
output_dir: 'android'
language: 'java'
class_name: 'EvgenAppAnalytics'
...
doc:
Markdown:
extension: 'md'
output_dir: 'md_doc'
Txt:
extension: 'txt'
output_dir: 'txt_doc'
To customize generated files you can create your own generation templates and specify it in evgen.yaml:
code:
configName1:
platform: 'Android'
output_dir: 'android'
language: 'java'
class_name: 'EvgenAppAnalytics'
template_dir: relative/path/to/your/java-templates
...
doc:
Markdown:
extension: 'md'
output_dir: 'md_doc'
template_dir: relative/path/to/your/md-templates
Txt:
extension: 'txt'
output_dir: 'txt_doc'
template_dir: relative/path/to/your/txt-templates
You can see default templates in src/templates
directory. It is Handlebars format extended by additional handlebars-helpers and local helpers from src/helpers
directory.