property NagareConfig.hooks

Hooks allow running custom functions at specific points in the release process. Useful for tasks like formatting, validation, or custom notifications.

Examples

Example 1

hooks: {
  preRelease: [
    async () => {
      // Run tests before release
      const result = await runTests();
      if (!result.success) throw new Error("Tests failed");
    }
  ],
  postRelease: [
    async () => {
      // Format generated files
      await formatGeneratedFiles();
      // Send notification
      await notifyTeam();
    }
  ]
}

Properties

optional
preRelease: Array<() => Promise<void>>

Functions to run before release

optional
postRelease: Array<() => Promise<void>>

Functions to run after release

Usage

import { type NagareConfig } from ".";