cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Bond-Caron <jbo...@gdesolutions.com>
Subject RE: Proposal: hooks support for plugins
Date Tue, 22 Apr 2014 14:33:37 GMT
On Mon Apr 21 03:39 PM, Sergey Grebnov (Akvelon) wrote:
> module.exports = function(platform, projectDir, pluginDir, cmdLine) {
>     console.log('hook.js: ' + platform);
>     console.log('hook.js: ' + projectDir);
>     console.log('hook.js: ' + pluginDir);
>     console.log('hook.js: ' + cmdLine);
> 

Personnaly prefer:

> module.exports = function(hookApi) {
>     console.log('hook.js: ' + hookApi.platform);
>     console.log('hook.js: ' + hookApi.projectDir);
>     console.log('hook.js: ' + hookApi.pluginDir);
>     console.log('hook.js: ' + hookApi.cmdLine);}

Make it easier to pass other stuff in the future & using a sandoxed hookApi object.


Mime
View raw message