Skip to content

Extension Points

Olena Orobei edited this page Jun 4, 2021 · 2 revisions

Template

Custom template

Application supports custom templates. In order to use this mechanism you need to:

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

Custom template directive

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

Custom template repeat

  • Create a new <custom_name>.js file under the src/template-handlers folder.
  • Create new class implementing src/api/template-handler-interface 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 a new <custom_name>.js file under the src/release-parsers folder.
  • Create a new class implementing corresponding src/api/release-parsers-interface 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 for use in the configuration.

Writers

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

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

Loaders

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

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

Custom loader configuration example:

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

Filters

Filters are responsible for filtering data received from the loader.

  • Create a new <custom_name>.js file under the src/filters folder.
  • Create a new class implementing src/api/filter-interface interface. Note: The name of the file will be used as filter name.
  • Use your custom filter name and configuration for loader.config.exclude config option.

Groups

Groups are responsible for grouping data received from the loader.

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