Extending Lookbook / Other

Lifecycle Hooks

A number of lifecycle hooks are available for use in triggering actions outside of Lookbook. Hook callbacks can be registered when configuring your Lookbook installation.

All hook callback blocks are yielded the main Lookbook application object as the first argument. Some hooks additionally supply other arguments - see below for details.

Available Hooks

The following hooks are available to register callbacks on:

Lookbook. after_initialize

Add a callback to run after app initialization.

Lookbook. before_exit

Add a callback to run before Lookbook shuts down.

Lookbook. after_change

Add a callback to run when a change to a watched file occurs. Only called when an evented file watcher is being used to detect changes.

User Guide

Extending Lookbook