I have a internal plugin that uses <runs> to listen to device readyevent, and then do some bootstrap code to initialize by talking to native side of plugin.
On Tue, Dec 2, 2014 at 11:11 AM, Michal Mocny <[email protected]> wrote: > Also <clobbers> and <merges> implies runs. <runs> is especially useful for > startup work that has to delay deviceready. > > On Tue, Dec 2, 2014 at 10:40 AM, Andrew Grieve <[email protected]> > wrote: > > > It's used in some core plugins as a reference: > > > > $ grep -r '<run' *plugin*/plugin.xml | sort | uniq > > cordova-plugin-battery-status/plugin.xml: <runs /> > > cordova-plugin-battery-status/plugin.xml: <runs/> > > cordova-plugin-camera/plugin.xml: <runs /> > > cordova-plugin-camera/plugin.xml: <runs /> > > cordova-plugin-contacts/plugin.xml: <runs /> > > cordova-plugin-device-motion/plugin.xml: <runs/> > > cordova-plugin-device-motion/plugin.xml: <runs /> > > cordova-plugin-device-orientation/plugin.xml: <runs/> > > cordova-plugin-device-orientation/plugin.xml: <runs /> > > cordova-plugin-device/plugin.xml: <runs /> > > cordova-plugin-dialogs/plugin.xml: <runs /> > > cordova-plugin-file-transfer/plugin.xml: <runs /> > > cordova-plugin-file-transfer/plugin.xml: <runs/> > > cordova-plugin-file/plugin.xml: <runs /> > > cordova-plugin-file/plugin.xml: <runs/> > > cordova-plugin-geolocation/plugin.xml: <runs /> > > cordova-plugin-globalization/plugin.xml: <runs /> > > cordova-plugin-globalization/plugin.xml: <runs/> > > cordova-plugin-media/plugin.xml: <runs/> > > cordova-plugin-network-information/plugin.xml: <runs /> > > cordova-plugin-splashscreen/plugin.xml: <runs /> > > cordova-plugin-statusbar/plugin.xml: <runs /> > > cordova-plugin-vibration/plugin.xml: <runs /> > > > > On Mon, Dec 1, 2014 at 6:12 PM, Joe Bowser <[email protected]> wrote: > > > > > On Thu Nov 27 2014 at 11:44:52 AM Andrew Grieve <[email protected]> > > > wrote: > > > > > > > > > > > Likely clobbers won't work for this since most modules access exec() > > via > > > a > > > > require(). You can actually swap out the module though, using: > > > > > > > > define.remove('cordova/exec') > > > > define('cordova/exec', function(...)) > > > > > > > > and use <runs/> to make it run before symbols are mapped. > > > > > > > > > > > > > > > I have no idea how this would work. Do we have any plugins that use > <runs > > > /> currently? I've never seen this used. This is the last piece > that's > > > blocking this from actually being done. > > > > > > > > > the define.remove() stuff isn't being done anywhere. Just happen to know > > that it exists. > > > -- Carlos Santana <[email protected]>
