interface VersionFile

Version file configuration for template-based version file generation

Examples

Built-in template:

const versionFile: VersionFile = {
  path: "./version.ts",
  template: TemplateFormat.TYPESCRIPT
};

Custom Vento template:

const versionFile: VersionFile = {
  path: "./version.js",
  template: TemplateFormat.CUSTOM,
  customTemplate: `export const VERSION = "{{ version }}";`
};

Properties

path: string

Path to the version file relative to project root

Template format (typescript, json, yaml, custom)

optional
customTemplate: string

Custom template string using Vento syntax (required if template is 'custom')

deprecated
optional
patterns: { [key: string]: RegExp | undefined; version?: RegExp; buildDate?: RegExp; gitCommit?: RegExp; }

Legacy patterns for extracting/updating version info

Additional exports to include in the generated version file

optional
extend: { prepend?: string; append?: string; }

Extend the template with additional content