cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Bond-Caron <>
Subject RE: Proposal: hooks support for plugins
Date Thu, 06 Mar 2014 16:16:40 GMT
On Wed Mar 5 04:13 PM, Michal Mocny wrote:
> For cli workflow: hooks (including plugin hooks) can access config.xml
> <preference>'s for things like the sqllite compile example (recompile only if
> settings changed would be nice), and access <preference> at runtime for the
> console example.
> For old workflow, perhaps sqllite is documented to manually run the hook to
> recompile whenever you want to change the default setting?
> Just thinking about alternatives and/or solutions that are actually feasible short
> term.

Ya it could work, maybe something like:
<preference name="cordova-plugin-console@install" value="--prefer-console true" /> (passed
to an install script)

Keep in mind 'install' options/config (only used once during the install process) aren't the
same as 'runtime' options/config (dynamic, changed by user)

<preference name="cordova-plugin-console:use-console" value="true" /> (runtime options?)
<preference name="cordova-plugin-console:color" value="pink" />

Some high level code at how the install script could work:

Not sure if we need a 'postinstall' script, instead in the preinstall.js could do something
project.onPostInstall('', function(hookApi){

 // do something else..


Many ways it could work, this is more pursuing the sandbox idea. 

View raw message