πŸ”’ Version

January 7, 2026 Β· View on GitHub

It creates file that contains information about version. πŸš€

πŸ“‹ Example Output

// IMPORTANT: THIS FILE IS AUTO GENERATED!
/* eslint-disable */
export const VERSION = {
  version: '0.0.1',
  date: '2023-12-31T22:22:19.346Z',
  author: {
    name: 'Dominik HladΓ­k',
    email: 'dominik.hladik@seznam.cz',
    url: 'https://github.com/Celtian',
  },
};
/* eslint-enable */

πŸš€ Quick Start

πŸ“ Add to angular.json

{
  ...,
  "projects": {
    "your-project-name": {
      ...,
      "architect": {
        ...,
        "version": {
          "builder": "ngx-devkit-builders:version",
          "options": {
            "outputFile": "src/environments/version.ts",
            "fields": ["version", "date", "author", "git"],
            "lint": "eslint",
            "variable": "VERSION",
            "verbose": false
          }
        }
      }
    }
  }
}

▢️ Run the builder

ng run your-project-name:version

βš™οΈ Options

OptionTypeDefaultDescription
outputFilestringsrc/environments/version.tsOutput file path (supports .ts or .json)
fieldsstring[]["version", "date", "author", "git"]Fields to include in version file
lintstringeslintLinter to use (eslint or tslint)
variablestringVERSIONVariable name for TypeScript output
verbosebooleanfalseShow detailed output