Github user riknoll commented on a diff in the pull request:

    https://github.com/apache/cordova-docs/pull/489#discussion_r53703389
  
    --- Diff: www/docs/en/dev/guide/appdev/hooks/index.md ---
    @@ -115,41 +218,86 @@ As a plugin developer you can define hook scripts 
using `<hook>` elements in a `
         <hook type="before_plugin_install" src="scripts/beforeInstall.js" />
         <hook type="after_build" src="scripts/afterBuild.js" />
     
    -    <platform name="wp8">
    -        <hook type="before_plugin_install" 
src="scripts/wp8BeforeInstall.js" />
    -        <hook type="before_build" src="scripts/wp8BeforeBuild.js" />
    +    <platform name="android">
    +        <hook type="before_plugin_install" 
src="scripts/androidBeforeInstall.js" />
    +        <hook type="before_build" src="scripts/androidBeforeBuild.js" />
             ...
         </platform>
     
    -`before_plugin_install`, `after_plugin_install`, `before_plugin_uninstall` 
plugin hooks will be fired exclusively for the plugin being 
installed/uninstalled.
    +`before_plugin_install`, `after_plugin_install`, `before_plugin_uninstall` 
plugin hooks will be fired
    +exclusively for the plugin being installed/uninstalled.
    +
    +### Via `/hooks` directory (Deprecated)
    +
    +To execute custom action when corresponding hook type is fired, use hook 
type as a name for a subfolder inside 'hooks' directory and place you script 
file here, for example:
    +
    +    # script file will be automatically executed after each build
    +    hooks/after_build/after_build_custom_action.js
    +
    +When using these hooks, they will always be run as executable files, not 
as loadable JavaScript modules.
    +
    +__Remember__: Make your scripts executable in this case.
    +
    +__Note__: this method is considered deprecated in favor of the hook 
elements in config.xml and plugin.xml.
    +
    +### Order of Hooks execution
    +
    +#### Based on Hooks Definition
    +
    +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`.
    +
    +#### Based on the Internal order of execution
    +
    +The internal order of execution of hooks is fixed.
    +
    +##### Example 1
    --- End diff --
    
    Make it clear in these examples what Cordova CLI command is being run. 
Instead of calling these Example 1 and Example 2, give them more descriptive 
headers. A person scrolling through the page should be able to find what they 
are looking for.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
For additional commands, e-mail: dev-h...@cordova.apache.org

Reply via email to