Github user rakatyal commented on a diff in the pull request:
https://github.com/apache/cordova-docs/pull/489#discussion_r52063845
--- Diff: www/docs/en/dev/guide/appdev/hooks/index.md ---
@@ -22,61 +22,191 @@ title: Hooks Guide
# Hooks Guide
+## Introduction
+
Cordova Hooks represent special scripts which could be added by
application and
plugin developers or even by your own build system to customize cordova
commands.
-Hook scripts could be defined by adding them to the special predefined
folder
-(`/hooks`) or via configuration files (`config.xml` and `plugin.xml`) and
run
-serially in the following order:
-
-* Application hooks from `/hooks`;
-* Application hooks from `config.xml`;
-* Plugin hooks from `plugins/.../plugin.xml`.
-__Note__: `/hooks` directory is considered deprecated in favor of the hook
elements
-in config.xml and plugin.xml.
-
-## Supported hook types
-The following hook types are supported:
-
- after_build
- after_compile
- after_clean
- after_docs
- after_emulate
- after_platform_add
- after_platform_rm
- after_platform_ls
- after_plugin_add
- after_plugin_ls
- after_plugin_rm
- after_plugin_search
- after_plugin_install // Plugin hooks in plugin.xml are executed for a
plugin being installed only
- after_prepare
- after_run
- after_serve
- before_build
- before_clean
- before_compile
- before_docs
- before_emulate
- before_platform_add
- before_platform_rm/
- before_platform_ls
- before_plugin_add
- before_plugin_ls
- before_plugin_rm
- before_plugin_search/
- before_plugin_install // Plugin hooks in plugin.xml are executed for a
plugin being installed only
- before_plugin_uninstall // Plugin hooks in plugin.xml are executed for
a plugin being uninstalled only
- before_prepare
- before_run
- before_serve
- pre_package // Windows and Windows Phone only
+There may be special activities that you would like to perform before
invoking
+cordova commands. For example, you may have a custom tool that checks for
code formatting
+in your javascript file. And, you would like to run this tool before every
build. In such
+a case, you could use a 'before_build' hook and instruct the cordova run
time to run the
+custom tool to be invoked before every build.
+
+There are 2 types of hooks:
+
+- Application specific hooks
+- Plugins related hooks
--- End diff --
Plugins specific hooks. Should we rename these to 'Application hooks' and
'Plugin hooks'?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]