GitHub user sgrebnov opened a pull request: https://github.com/apache/cordova-lib/pull/55
CB-6481 Add unified hooks support for cordova app and plugins https://issues.apache.org/jira/browse/CB-6481 Added the following changes and new features * Hooks can be defined in .cordova/hooks/hook_type, hooks/hook_type directories, **config.xml** (by application developers) and plugins/.../**plugin.xml** (by plugins developers) * Javascript hooks retrieved from config.xml and plugins/.../plugin.xml will be run via new module loader with special **Context argument** passed. This object represents current hook script execution context including hook type, cordova version, paths, plugin info and other special utility modules. * Introduced **before_plugin_install**, **after_plugin_install** and **before_plugin_uninstall** hooks. See updated docs for more details: https://github.com/MSOpenTech/cordova-lib/commit/952690b7d7b42962b4e246c2b84c309846bf8750?short_path=8c918a9#diff-8c918a9f452feb5e3ef3339749806fc3 Please note, that there are some remaining work items here below before we can merge it. The PR has been sent to get community feedback and adjust implementation while we are working on unit tests. * Write unit test (in-progress) * Replace original Hooker with new implementation everywhere, Currently 'before_build' is supported for general application hooks. You can merge this pull request into a Git repository by running: $ git pull https://github.com/MSOpenTech/cordova-lib CB-6481-hooks Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-lib/pull/55.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #55 ---- commit d51b5ac509014ccd28351cb5b853cef0a4188358 Author: daserge <dase...@yandex.ru> Date: 2014-07-09T12:08:59Z CB-6481 Added unified hooks support for cordova app and plugins * Hooks can be defined in .cordova/hooks/hook_type, hooks/hook_type directories, config.xml and plugins/.../plugin.xml * Javascript hooks retrieved from config.xml and plugins/.../plugin.xml will be run via new module loader * Introduced before_plugin_install, after_plugin_install and before_plugin_uninstall hooks commit 952690b7d7b42962b4e246c2b84c309846bf8750 Author: daserge <dase...@yandex.ru> Date: 2014-07-09T12:20:11Z CB-6481 Updated hooks documentation ---- --- 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. ---