cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [1/3] git commit: Use events.emit instead of re-importing plugman each time
Date Wed, 16 Apr 2014 20:57:40 GMT
Repository: cordova-plugman
Updated Branches:
  refs/heads/browserify 2551a5798 -> 7e05089d0


Use events.emit instead of re-importing plugman each time

Looks like the re-import is no longer needed after this change
github.com/apache/cordova-plugman/commit/ae2ce7ac6325d1c6558365b4be82e5a8ff0983b9
the problem was probably due to
plugman.emit = emitter.emit
without binding the "this" for emit to the emitter.
Got no clue why the re-import is hiding that problem.


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/961ccd7c
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/961ccd7c
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/961ccd7c

Branch: refs/heads/browserify
Commit: 961ccd7cd22d43f4b75145d916afec395dd0db56
Parents: 28318d8
Author: Mark Koudritsky <kamrik@gmail.com>
Authored: Mon Apr 14 19:45:57 2014 -0400
Committer: Mark Koudritsky <kamrik@gmail.com>
Committed: Mon Apr 14 19:45:57 2014 -0400

----------------------------------------------------------------------
 src/platforms/amazon-fireos.js | 11 ++++++-----
 src/platforms/android.js       | 11 ++++++-----
 src/platforms/blackberry10.js  | 13 +++++++------
 src/platforms/firefoxos.js     | 19 ++++++++++---------
 src/platforms/ios.js           |  5 +++--
 src/platforms/tizen.js         | 19 ++++++++++---------
 src/platforms/ubuntu.js        |  9 +++++----
 src/platforms/windows8.js      | 13 +++++++------
 src/platforms/wp7.js           | 17 +++++++++--------
 src/platforms/wp8.js           | 17 +++++++++--------
 10 files changed, 72 insertions(+), 62 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/961ccd7c/src/platforms/amazon-fireos.js
----------------------------------------------------------------------
diff --git a/src/platforms/amazon-fireos.js b/src/platforms/amazon-fireos.js
index 0ec67dd..adfc847 100644
--- a/src/platforms/amazon-fireos.js
+++ b/src/platforms/amazon-fireos.js
@@ -20,6 +20,7 @@
 var fs = require('fs')  // use existsSync in 0.6.x
    , path = require('path')
    , common = require('./common')
+   , events = require('../events')
    , xml_helpers = require(path.join(__dirname, '..', 'util', 'xml-helpers'));
 
 module.exports = {
@@ -46,10 +47,10 @@ module.exports = {
     },
     "header-file": {
         install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'header-fileinstall is not supported
for amazon-fireos');
+            events.emit('verbose', 'header-fileinstall is not supported for amazon-fireos');
         },
         uninstall:function(source_el, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'header-file.uninstall is not supported
for amazon-fireos');
+            events.emit('verbose', 'header-file.uninstall is not supported for amazon-fireos');
         }
     },
     "lib-file":{
@@ -68,7 +69,7 @@ module.exports = {
         install:function(el, plugin_dir, project_dir, plugin_id) {
             var src = el.attrib.src;
             var target = el.attrib.target;
-            require('../../plugman').emit('verbose', 'Copying resource file ' + src + ' to
' + target);
+            events.emit('verbose', 'Copying resource file ' + src + ' to ' + target);
             common.copyFile(plugin_dir, src, project_dir, target);
         },
         uninstall:function(el, project_dir, plugin_id) {
@@ -78,10 +79,10 @@ module.exports = {
     },
     "framework": {
         install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'framework.install is not supported
for amazon-fireos');
+            events.emit('verbose', 'framework.install is not supported for amazon-fireos');
         },
         uninstall:function(source_el, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'framework.uninstall is not supported
for amazon-fireos');
+            events.emit('verbose', 'framework.uninstall is not supported for amazon-fireos');
         }
     }
 };

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/961ccd7c/src/platforms/android.js
----------------------------------------------------------------------
diff --git a/src/platforms/android.js b/src/platforms/android.js
index e396680..c323790 100644
--- a/src/platforms/android.js
+++ b/src/platforms/android.js
@@ -20,6 +20,7 @@
 var fs = require('fs')  // use existsSync in 0.6.x
    , path = require('path')
    , common = require('./common')
+   , events = require('../events')
    , xml_helpers = require(path.join(__dirname, '..', 'util', 'xml-helpers'));
 
 module.exports = {
@@ -47,10 +48,10 @@ module.exports = {
     },
     "header-file": {
         install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'header-file.install is not supported
for android');
+            events.emit('verbose', 'header-file.install is not supported for android');
         },
         uninstall:function(source_el, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'header-file.uninstall is not supported
for android');
+            events.emit('verbose', 'header-file.uninstall is not supported for android');
         }
     },
     "lib-file":{
@@ -69,7 +70,7 @@ module.exports = {
         install:function(el, plugin_dir, project_dir, plugin_id) {
             var src = el.attrib.src;
             var target = el.attrib.target;
-            require('../../plugman').emit('verbose', 'Copying resource file ' + src + ' to
' + target);
+            events.emit('verbose', 'Copying resource file ' + src + ' to ' + target);
             common.copyFile(plugin_dir, src, project_dir, path.normalize(target));
         },
         uninstall:function(el, project_dir, plugin_id) {
@@ -79,10 +80,10 @@ module.exports = {
     },
     "framework": {
         install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'framework.install is not supported
for android');
+            events.emit('verbose', 'framework.install is not supported for android');
         },
         uninstall:function(source_el, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'framework.uninstall is not supported
for android');
+            events.emit('verbose', 'framework.uninstall is not supported for android');
         }
     }
 };

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/961ccd7c/src/platforms/blackberry10.js
----------------------------------------------------------------------
diff --git a/src/platforms/blackberry10.js b/src/platforms/blackberry10.js
index d9e93ad..9e370b6 100644
--- a/src/platforms/blackberry10.js
+++ b/src/platforms/blackberry10.js
@@ -20,6 +20,7 @@
 var fs = require('fs')  // use existsSync in 0.6.x
    , path = require('path')
    , common = require('./common')
+   , events = require('../events')
    , xml_helpers = require(path.join(__dirname, '..', 'util', 'xml-helpers'));
 
 var TARGETS = ["device", "simulator"];
@@ -54,10 +55,10 @@ module.exports = {
     },
     "header-file": {
         install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'header-file.install is not supported
for blackberry');
+            events.emit('verbose', 'header-file.install is not supported for blackberry');
         },
         uninstall:function(source_el, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'header-file.uninstall is not supported
for blackberry');
+            events.emit('verbose', 'header-file.uninstall is not supported for blackberry');
         }
     },
     "lib-file":{
@@ -76,18 +77,18 @@ module.exports = {
     },
     "resource-file":{
         install:function(el, plugin_dir, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'resource-file.install is not supported
for blackberry');
+            events.emit('verbose', 'resource-file.install is not supported for blackberry');
         },
         uninstall:function(el, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'resource-file.uninstall is not supported
for blackberry');
+            events.emit('verbose', 'resource-file.uninstall is not supported for blackberry');
         }
     },
     "framework": {
         install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'framework.install is not supported
for blackberry');
+            events.emit('verbose', 'framework.install is not supported for blackberry');
         },
         uninstall:function(source_el, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'framework.uninstall is not supported
for blackberry');
+            events.emit('verbose', 'framework.uninstall is not supported for blackberry');
         }
     }
 };

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/961ccd7c/src/platforms/firefoxos.js
----------------------------------------------------------------------
diff --git a/src/platforms/firefoxos.js b/src/platforms/firefoxos.js
index 90f6c8f..c2e5971 100644
--- a/src/platforms/firefoxos.js
+++ b/src/platforms/firefoxos.js
@@ -1,6 +1,7 @@
 var path = require('path')
     , fs = require('fs')
     , common = require('./common')
+    , events = require('../events')
     , xml_helpers = require(path.join(__dirname, '..', 'util', 'xml-helpers'));
 
 module.exports = {
@@ -16,7 +17,7 @@ module.exports = {
             if (!fs.existsSync(old_config_path)) {
                 // output newer location and fail reading
                 config_path = preferred_path;
-                require('../../plugman').emit('verbose', 'unable to find '+config_path);
+                events.emit('verbose', 'unable to find '+config_path);
             } else {
                 config_path = old_config_path;
             }
@@ -38,34 +39,34 @@ module.exports = {
     },
     "header-file": {
         install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'header-fileinstall is not supported
for firefoxos');
+            events.emit('verbose', 'header-fileinstall is not supported for firefoxos');
         },
         uninstall:function(source_el, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'header-file.uninstall is not supported
for firefoxos');
+            events.emit('verbose', 'header-file.uninstall is not supported for firefoxos');
         }
     },
     "resource-file":{
         install:function(el, plugin_dir, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'resource-file.install is not supported
for firefoxos');
+            events.emit('verbose', 'resource-file.install is not supported for firefoxos');
         },
         uninstall:function(el, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'resource-file.uninstall is not supported
for firefoxos');
+            events.emit('verbose', 'resource-file.uninstall is not supported for firefoxos');
         }
     },
     "framework": {
         install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'framework.install is not supported
for firefoxos');
+            events.emit('verbose', 'framework.install is not supported for firefoxos');
         },
         uninstall:function(source_el, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'framework.uninstall is not supported
for firefoxos');
+            events.emit('verbose', 'framework.uninstall is not supported for firefoxos');
         }
     },
     "lib-file": {
         install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'lib-file.install is not supported for
firefoxos');
+            events.emit('verbose', 'lib-file.install is not supported for firefoxos');
         },
         uninstall:function(source_el, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'lib-file.uninstall is not supported
for firefoxos');
+            events.emit('verbose', 'lib-file.uninstall is not supported for firefoxos');
         }
     }    
 };

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/961ccd7c/src/platforms/ios.js
----------------------------------------------------------------------
diff --git a/src/platforms/ios.js b/src/platforms/ios.js
index c19e3cb..9631e64 100644
--- a/src/platforms/ios.js
+++ b/src/platforms/ios.js
@@ -23,6 +23,7 @@ var path = require('path')
   , xcode = require('xcode')
   , plist = require('plist-with-patches')
   , shell = require('shelljs')
+  , events = require('../events')
   , cachedProjectFiles = {};
 
 module.exports = {
@@ -141,10 +142,10 @@ module.exports = {
     },
     "lib-file": {
         install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'lib-file.install is not supported for
ios');
+            events.emit('verbose', 'lib-file.install is not supported for ios');
         },
         uninstall:function(source_el, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'lib-file.uninstall is not supported
for ios');
+            events.emit('verbose', 'lib-file.uninstall is not supported for ios');
         }
     },    
     parseProjectFile:function(project_dir) {

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/961ccd7c/src/platforms/tizen.js
----------------------------------------------------------------------
diff --git a/src/platforms/tizen.js b/src/platforms/tizen.js
index 6d42024..efbeba9 100644
--- a/src/platforms/tizen.js
+++ b/src/platforms/tizen.js
@@ -1,6 +1,7 @@
 var path = require('path')
     , fs = require('fs')
     , common = require('./common')
+    , events = require('../events')
     , xml_helpers = require(path.join(__dirname, '..', 'util', 'xml-helpers'));
 
 module.exports = {
@@ -16,7 +17,7 @@ module.exports = {
             if (!fs.existsSync(old_config_path)) {
                 // output newer location and fail reading
                 config_path = preferred_path;
-                require('../../plugman').emit('verbose', 'unable to find '+config_path);
+                events.emit('verbose', 'unable to find '+config_path);
             } else {
                 config_path = old_config_path;
             }
@@ -38,34 +39,34 @@ module.exports = {
     },
     "header-file": {
         install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'header-fileinstall is not supported
for firefoxos');
+            events.emit('verbose', 'header-fileinstall is not supported for firefoxos');
         },
         uninstall:function(source_el, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'header-file.uninstall is not supported
for firefoxos');
+            events.emit('verbose', 'header-file.uninstall is not supported for firefoxos');
         }
     },
     "resource-file":{
         install:function(el, plugin_dir, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'resource-file.install is not supported
for firefoxos');
+            events.emit('verbose', 'resource-file.install is not supported for firefoxos');
         },
         uninstall:function(el, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'resource-file.uninstall is not supported
for firefoxos');
+            events.emit('verbose', 'resource-file.uninstall is not supported for firefoxos');
         }
     },
     "framework": {
         install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'framework.install is not supported
for firefoxos');
+            events.emit('verbose', 'framework.install is not supported for firefoxos');
         },
         uninstall:function(source_el, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'framework.uninstall is not supported
for firefoxos');
+            events.emit('verbose', 'framework.uninstall is not supported for firefoxos');
         }
     },
     "lib-file": {
         install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'lib-file.install is not supported for
firefoxos');
+            events.emit('verbose', 'lib-file.install is not supported for firefoxos');
         },
         uninstall:function(source_el, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'lib-file.uninstall is not supported
for firefoxos');
+            events.emit('verbose', 'lib-file.uninstall is not supported for firefoxos');
         }
     }
 };

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/961ccd7c/src/platforms/ubuntu.js
----------------------------------------------------------------------
diff --git a/src/platforms/ubuntu.js b/src/platforms/ubuntu.js
index d878e51..d04b774 100644
--- a/src/platforms/ubuntu.js
+++ b/src/platforms/ubuntu.js
@@ -29,6 +29,7 @@ function toCamelCase(str) {
 
 var fs = require('fs')
    , path = require('path')
+   , events = require('../events')
    , xml_helpers = require(path.join(__dirname, '..', 'util', 'xml-helpers'));
 
 module.exports = {
@@ -106,18 +107,18 @@ module.exports = {
     },
     "framework": {
         install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'framework.install is not supported
for ubuntu');
+            events.emit('verbose', 'framework.install is not supported for ubuntu');
         },
         uninstall:function(source_el, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'framework.uninstall is not supported
for ubuntu');
+            events.emit('verbose', 'framework.uninstall is not supported for ubuntu');
         }
     },
     "lib-file": {
         install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'lib-file.install is not supported for
ubuntu');
+            events.emit('verbose', 'lib-file.install is not supported for ubuntu');
         },
         uninstall:function(source_el, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'lib-file.uninstall is not supported
for ubuntu');
+            events.emit('verbose', 'lib-file.uninstall is not supported for ubuntu');
         }
     }
 };

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/961ccd7c/src/platforms/windows8.js
----------------------------------------------------------------------
diff --git a/src/platforms/windows8.js b/src/platforms/windows8.js
index 2232192..1f7583f 100644
--- a/src/platforms/windows8.js
+++ b/src/platforms/windows8.js
@@ -23,6 +23,7 @@ var common = require('./common'),
     shell = require('shelljs'),
     fs = require('fs'),
     w8jsproj = require('../util/w8jsproj'),
+    events = require('../events'),
     xml_helpers = require('../util/xml-helpers');
 
 
@@ -63,15 +64,15 @@ module.exports = {
     },
     "header-file": {
         install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'header-fileinstall is not supported
for Windows 8');
+            events.emit('verbose', 'header-fileinstall is not supported for Windows 8');
         },
         uninstall:function(source_el, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'header-file.uninstall is not supported
for Windows 8');
+            events.emit('verbose', 'header-file.uninstall is not supported for Windows 8');
         }
     },
     "resource-file":{
         install:function(el, plugin_dir, project_dir, plugin_id, project_file) {
-            require('../../plugman').emit('verbose', 'resource-file is not supported for
Windows 8');
+            events.emit('verbose', 'resource-file is not supported for Windows 8');
         },
         uninstall:function(el, project_dir, plugin_id, project_file) {
         }
@@ -82,14 +83,14 @@ module.exports = {
             project_file.addSDKRef(inc);
         },
         uninstall:function(el, project_dir, plugin_id, project_file) {
-            require('../../plugman').emit('verbose', 'windows8 lib-file uninstall :: ' +
plugin_id);
+            events.emit('verbose', 'windows8 lib-file uninstall :: ' + plugin_id);
             var inc = el.attrib['Include'];
             project_file.removeSDKRef(inc);
         }
     },
     "framework": {
         install:function(el, plugin_dir, project_dir, plugin_id, project_file) {
-            require('../../plugman').emit('verbose', 'windows8 framework install :: ' + plugin_id);
+            events.emit('verbose', 'windows8 framework install :: ' + plugin_id);
 
             var src = el.attrib['src'];
             var dest = src; // if !isCustom, we will just add a reference to the file in
place
@@ -109,7 +110,7 @@ module.exports = {
 
         },
         uninstall:function(el, project_dir, plugin_id, project_file) {
-            require('../../plugman').emit('verbose', 'windows8 framework uninstall :: ' +
plugin_id  );
+            events.emit('verbose', 'windows8 framework uninstall :: ' + plugin_id  );
 
             var src = el.attrib['src'];
             // technically it is not possible to get here without isCustom == true -jm

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/961ccd7c/src/platforms/wp7.js
----------------------------------------------------------------------
diff --git a/src/platforms/wp7.js b/src/platforms/wp7.js
index ebbd862..e6a76d0 100644
--- a/src/platforms/wp7.js
+++ b/src/platforms/wp7.js
@@ -22,6 +22,7 @@ var common = require('./common'),
     glob = require('glob'),
     fs = require('fs'),
     csproj = require('../util/csproj'),
+    events = require('../events'),
     xml_helpers = require('../util/xml-helpers');
 
 module.exports = {
@@ -57,34 +58,34 @@ module.exports = {
     },
     "header-file": {
         install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'header-fileinstall is not supported
for wp7');
+            events.emit('verbose', 'header-fileinstall is not supported for wp7');
         },
         uninstall:function(source_el, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'header-file.uninstall is not supported
for wp7');
+            events.emit('verbose', 'header-file.uninstall is not supported for wp7');
         }
     },
     "resource-file":{
         install:function(el, plugin_dir, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'resource-file.install is not supported
for wp7');
+            events.emit('verbose', 'resource-file.install is not supported for wp7');
         },
         uninstall:function(el, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'resource-file.uninstall is not supported
for wp7');
+            events.emit('verbose', 'resource-file.uninstall is not supported for wp7');
         }
     },
     "framework": {
         install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'framework.install is not supported
for wp7');
+            events.emit('verbose', 'framework.install is not supported for wp7');
         },
         uninstall:function(source_el, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'framework.uninstall is not supported
for wp7');
+            events.emit('verbose', 'framework.uninstall is not supported for wp7');
         }
     },
     "lib-file": {
         install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'lib-file.install is not supported for
wp7');
+            events.emit('verbose', 'lib-file.install is not supported for wp7');
         },
         uninstall:function(source_el, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'lib-file.uninstall is not supported
for wp7');
+            events.emit('verbose', 'lib-file.uninstall is not supported for wp7');
         }
     }
 };

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/961ccd7c/src/platforms/wp8.js
----------------------------------------------------------------------
diff --git a/src/platforms/wp8.js b/src/platforms/wp8.js
index 8eb62c2..31bbdea 100644
--- a/src/platforms/wp8.js
+++ b/src/platforms/wp8.js
@@ -22,6 +22,7 @@ var common = require('./common'),
     glob = require('glob'),
     fs = require('fs'),
     csproj = require('../util/csproj'),
+    events = require('../events'),
     xml_helpers = require('../util/xml-helpers');
 
 module.exports = {
@@ -57,23 +58,23 @@ module.exports = {
     },
     "header-file": {
         install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'header-file.install is not supported
for wp8');
+            events.emit('verbose', 'header-file.install is not supported for wp8');
         },
         uninstall:function(source_el, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'header-file.uninstall is not supported
for wp8');
+            events.emit('verbose', 'header-file.uninstall is not supported for wp8');
         }
     },
     "resource-file":{
         install:function(el, plugin_dir, project_dir, plugin_id, project_file) {
-            require('../../plugman').emit('verbose', 'resource-file.install is not supported
for wp8');
+            events.emit('verbose', 'resource-file.install is not supported for wp8');
         },
         uninstall:function(el, project_dir, plugin_id, project_file) {
-            require('../../plugman').emit('verbose', 'resource-file.uninstall is not supported
for wp8');
+            events.emit('verbose', 'resource-file.uninstall is not supported for wp8');
         }
     },
     "framework":{
         install:function(el, plugin_dir, project_dir, plugin_id, project_file) {
-            require('../../plugman').emit('verbose', 'wp8 framework install :: ' + plugin_id
 );
+            events.emit('verbose', 'wp8 framework install :: ' + plugin_id  );
 
             var src = el.attrib['src'];
             var dest = src; // if !isCustom, we will just add a reference to the file in
place
@@ -88,7 +89,7 @@ module.exports = {
 
         },
         uninstall:function(el, project_dir, plugin_id, project_file) {
-            require('../../plugman').emit('verbose', 'wp8 framework uninstall :: ' + plugin_id
 );
+            events.emit('verbose', 'wp8 framework uninstall :: ' + plugin_id  );
 
             var src = el.attrib['src'];
             var isCustom = el.attrib.custom == "true";
@@ -103,10 +104,10 @@ module.exports = {
     },
     "lib-file": {
         install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'lib-file.install is not supported for
wp8');
+            events.emit('verbose', 'lib-file.install is not supported for wp8');
         },
         uninstall:function(source_el, project_dir, plugin_id) {
-            require('../../plugman').emit('verbose', 'lib-file.uninstall is not supported
for wp8');
+            events.emit('verbose', 'lib-file.uninstall is not supported for wp8');
         }
     }    
 };


Mime
View raw message