Skip to content

Extension Points

Volodymyr Zaiets edited this page May 20, 2021 · 2 revisions

Template

Custom template

Application supports custom templates, for that you need:

  • Create new <custom_name>.md file in src/templates folder.
  • Declare custom template using template repeats, template tags, template directives.
  • Set your custom template name to output.template config option.

Custom template directive

  • Create new <custom_name>.js file in src/template-directives folder.
  • Create new class implementing corresponding interface. (src/api/template-directive-interface)
    Note: The name of the class will be used as a directive name.
  • Use custom directive in the template using custom directive class name as the directive name.

Custom template repeat

  • Create new <custom_name>.js file in src/template-handlers folder.
  • Create new class implementing corresponding interface. (src/api/template-handler-interface)
    Note: The name of the class will be used as a repeat name.
  • Use custom repeat in template uses custom repeat class name as the directive name.

Release Parsers

The application supports multiple types of declaration of version ranges, but you can create a new one!

  • Create new <custom_name>.js file in src/release-parsers folder.
  • Create new class implementing corresponding interface. (src/api/release-parsers-interface)
    Note: The name of the file will be used as the parser name.
  • The release parser will be automatically registered in the application and available to use in configuration

Writers

The application supports multiple types of declaration for version ranges, but you can create a new one!

  • Create new <custom_name>.js file in src/writers folder.
  • Create new class implementing corresponding interface. (src/api/changelog-writer-interface)
    Note: The name of the file will be used as a writer name.
  • Set your custom writer name to output.format config option.

Loaders

Custom loader allows you to collect a specific set of data from Github.

  • Create new <custom_name>.js file in src/loades folder.
  • Create new class implementing corresponding interface. (src/api/loader-interface)
    Note: The name of the file will be used as a loader name.
  • Set your custom loader name and configuration to loader.name and loader.config config options.

Custom loader configuration example:

    "loader": {
        "name: "<customFileName>"
    }

Filters

Filters are responsible for filter data received from the loader.

  • Create new <custom_name>.js file in src/filters folder.
  • Create new class implementing corresponding interface. (src/api/filter-interface)
    Note: The name of the file will be used as filter name.
  • Set your custom filter name and configuration to loader.config.exclude config option.

Groups

Filters are responsible for filter data received from the loader.

  • Create new <custom_name>.js file in src/groups folder. Note: The name of the file will be used as a group name.
  • Set your custom group name and configuration to loader.config.groupBy.name config option.
    Example:
    "groupBy": {
        "name: "<customFileName>"
    }

Clone this wiki locally