@@ -9,21 +9,21 @@ var shell = require('shelljs');
99var path = require ( 'path' ) ;
1010
1111var CordovaLogger = require ( 'cordova-common' ) . CordovaLogger ;
12- var selfEvents = require ( 'cordova-common' ) . events ;
12+ var events = require ( 'cordova-common' ) . events ;
1313
1414var PLATFORM_NAME = 'testplatform' ;
1515
1616function setupEvents ( externalEventEmitter ) {
1717 if ( externalEventEmitter ) {
1818 // This will make the platform internal events visible outside
19- selfEvents . forwardEventsTo ( externalEventEmitter ) ;
19+ events . forwardEventsTo ( externalEventEmitter ) ;
2020 return externalEventEmitter ;
2121 }
2222
2323 // There is no logger if external emitter is not present,
2424 // so attach a console logger
25- CordovaLogger . get ( ) . subscribe ( selfEvents ) ;
26- return selfEvents ;
25+ CordovaLogger . get ( ) . subscribe ( events ) ;
26+ return events ;
2727}
2828
2929function Api ( platform , platformRootDir , events ) {
@@ -47,9 +47,9 @@ function Api(platform, platformRootDir, events) {
4747
4848}
4949
50- Api . createPlatform = function ( destination , config , options , events ) {
50+ Api . createPlatform = function ( destination , config , options , externalEvents ) {
5151
52- events = setupEvents ( events ) ;
52+ events = setupEvents ( externalEvents ) ;
5353
5454 // create the destination and the standard place for our api to live
5555 // platforms/platformName/cordova/Api.js
@@ -74,7 +74,7 @@ Api.createPlatform = function (destination, config, options, events) {
7474} ;
7575
7676
77- Api . updatePlatform = function ( destination , options , events ) {
77+ Api . updatePlatform = function ( destination , options ) {
7878 events . emit ( 'log' , "test-platform:Api:updatePlatform" ) ;
7979 // todo?: create projectInstance and fulfill promise with it.
8080 return Promise . resolve ( ) ;
0 commit comments