List of all Cordova hooks

Devops

Cordova

Android

Hi there.

We will start simple for the first post. Here is a thing I spent some time looking for - a complete list of Cordova hooks.

The list may change, but the official definition is directly in Cordova documentation and is rather simple - there is one before_ and after_ hook for each cordova command.

before_build/  
after_build

before_compile/  
after_compile/

before_docs/  
after_docs/

before_emulate/  
after_emulate/

before_platform_add/  
after_platform_add/

before_platform_rm/  
after_platform_rm/

before_platform_ls/  
after_platform_ls/

before_plugin_add/  
after_plugin_add/

before_plugin_ls/  
after_plugin_ls/

before_plugin_rm/  
after_plugin_rm/

before_plugin_search/  
after_plugin_search/

# Only executed for the plugin being installed
before_plugin_install/  
after_plugin_install/

# Only executed for the plugin being removed so there is no after
before_plugin_uninstall/

before_prepare/  
after_prepare/

before_run/  
after_run/

before_serve/  
after_serve/

pre_package/ <-- Windows 8 and Windows Phone only.  

This comes from an answer on SO.