Skip to main content

watch

This function is similar to run, but it also watches for changes in the input directory and automatically recompiles the translation files.

watch(options: RunnerOptions): Promise<Stats[]>

Receive the options WatcherOptions object with the same properties as the RunnerOptions object but with the following additional properties:

  • hooks.beforeRun [optional] - A function that will be called before running the pipeline.
  • hooks.afterRun [optional] - A function that will be called after running the pipeline.

Note that you can use the --watch flag when running the command-line interface.