On the Master Zend Framework blog Matthew Setter explains the scripts section of composer.json.

The scripts section of composer.json allows you to set up a range of commands which relate to your project, commands which call command-line executables and PHP callbacks. The commands can be named as you see fit, such as test, clean, deploy and so on. Or they can use the names of events which Composer fires during its execution process, such as post-root-package-install, pre-install-cmd, and post-package-update. In today’s tutorial, I’m going to take you through examples which highlight both approaches