cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raymond Camden <raymondcam...@gmail.com>
Subject hook logging issue
Date Thu, 26 Mar 2015 22:10:34 GMT
This may stray into the "it should be on the google group" territory,
if so, just let me know.

I'm rewriting Holly's after_platform_add hook to use module.exports.
When I do, I notice console.log no longer works. Is that expected -
and if so - is there a workaround? (To be clear, the hook still works
perfectly well as far as I can see, I just don't see console output.)

module.exports = function(context) {

console.log("Testing "+context);
var pluginlist = [
   "org.apache.cordova.device",
   "org.apache.cordova.device-motion",
   "org.apache.cordova.device-orientation",
   "org.apache.cordova.geolocation"
];

// no need to configure below
var fs = require('fs');
var path = require('path');
var sys = require('sys')
var exec = require('child_process').exec;

function puts(error, stdout, stderr) {
//console.log(stdout);
}

pluginlist.forEach(function(plug) {
exec("cordova plugin add " + plug, puts);
});


}

-- 
===========================================================================
Raymond Camden, Developer Advocate for MobileFirst at IBM

Email : raymondcamden@gmail.com
Blog : www.raymondcamden.com
Twitter: raymondcamden

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


Mime
View raw message