cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject cordova-create git commit: removed stripping eventlisteners
Date Fri, 02 Sep 2016 18:19:41 GMT
Repository: cordova-create
Updated Branches:
  refs/heads/master 2cc4e1f18 -> b61f8706c


removed stripping eventlisteners


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

Branch: refs/heads/master
Commit: b61f8706c7b3568e1a64fbab6daf9af8ea2b7fd5
Parents: 2cc4e1f
Author: Steve Gill <stevengill97@gmail.com>
Authored: Fri Sep 2 11:19:36 2016 -0700
Committer: Steve Gill <stevengill97@gmail.com>
Committed: Fri Sep 2 11:19:36 2016 -0700

----------------------------------------------------------------------
 index.js            |  7 +------
 spec/create.spec.js | 24 ++++++++++++------------
 2 files changed, 13 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-create/blob/b61f8706/index.js
----------------------------------------------------------------------
diff --git a/index.js b/index.js
index aba53e0..48b59bf 100644
--- a/index.js
+++ b/index.js
@@ -55,9 +55,6 @@ function setupEvents(externalEventEmitter) {
     return events;
 }
 
-function cleanupEvents() {
-    events.removeAllListeners();
-}
 /**
  * Usage:
  * @dir - directory where the project will be created. Required.
@@ -314,8 +311,6 @@ module.exports = function(dir, optionalId, optionalName, cfg, extEvents)
{
             conf.setVersion('1.0.0');
             conf.write();
         }  
-    }).then(function(){
-        cleanupEvents();
     });
 };
 
@@ -478,4 +473,4 @@ function writeToConfigJson(project_root, opts, autoPersist) {
     if (!fs.existsSync(copyDst) && fs.existsSync(copySrc)) {
         shell.cp(copySrc, projectDir);
     }
- }
\ No newline at end of file
+ }

http://git-wip-us.apache.org/repos/asf/cordova-create/blob/b61f8706/spec/create.spec.js
----------------------------------------------------------------------
diff --git a/spec/create.spec.js b/spec/create.spec.js
index a1cf498..4cc445e 100644
--- a/spec/create.spec.js
+++ b/spec/create.spec.js
@@ -73,7 +73,7 @@ var configNPM = {
 
 describe('cordova create checks for valid-identifier', function() {
     it('should reject reserved words from start of id', function(done) {
-        create('projectPath', 'int.bob', 'appName')
+        create('projectPath', 'int.bob', 'appName', {}, events)
         .fail(function(err) {
             expect(err.message).toBe('App id contains a reserved word, or is not a valid
identifier.');
         })
@@ -81,7 +81,7 @@ describe('cordova create checks for valid-identifier', function() {
     }, 60000);
     
     it('should reject reserved words from end of id', function(done) {
-        create('projectPath', 'bob.class', 'appName')
+        create('projectPath', 'bob.class', 'appName', {}, events)
         .fail(function(err) {
             expect(err.message).toBe('App id contains a reserved word, or is not a valid
identifier.');
         })
@@ -188,7 +188,7 @@ describe('create end-to-end', function() {
     it('should successfully run with Git URL', function(done) {
         // Call cordova create with no args, should return help.)
         // Create a real project
-        return create(project, appId, appName, configGit)
+        return create(project, appId, appName, configGit, events)
         .then(checkProject)
         .fail(function(err) {
             console.log(err && err.stack);
@@ -222,7 +222,7 @@ describe('create end-to-end', function() {
             }
         };
         // Create a real project
-        return create(project, appId, appName, config)
+        return create(project, appId, appName, config, events)
         .then(checkProject)
         .then(function(){
             // Check that we got the right config.xml
@@ -248,7 +248,7 @@ describe('create end-to-end', function() {
             }
         };
         // Create a real project
-        return create(project, appId, appName, config)
+        return create(project, appId, appName, config, events)
         .then(checkProject)
         .fail(function(err) {
             console.log(err && err.stack);
@@ -270,7 +270,7 @@ describe('create end-to-end', function() {
         };
 
         // Create a real project
-        return create(project, appId, appName, config)
+        return create(project, appId, appName, config, events)
         .then(checkProject)
         .fail(function(err) {
             console.log(err && err.stack);
@@ -283,7 +283,7 @@ describe('create end-to-end', function() {
     it('should successfully run with template having package.json, and subdirectory, and
package.json in subdirectory', function(done) {
         // Call cordova create with no args, should return help.
         var config = configSubDirPkgJson;
-        return create(project, appId, appName, config)
+        return create(project, appId, appName, config, events)
         .then(checkSubDir)
         .fail(function(err) {
             console.log(err && err.stack);
@@ -296,7 +296,7 @@ describe('create end-to-end', function() {
         // Call cordova create with no args, should return help.
         var config = configConfigInWww;
         // Create a real project
-        return create(project, appId, appName, config)
+        return create(project, appId, appName, config, events)
         .then(checkConfigXml)
         .fail(function(err) {
             console.log(err && err.stack);
@@ -315,7 +315,7 @@ describe('create end-to-end', function() {
                 }
             }
         };
-        return create(project, appId, appName, config)
+        return create(project, appId, appName, config, events)
         .then(checkConfigXml)
         .fail(function(err) {
             console.log(err && err.stack);
@@ -372,7 +372,7 @@ describe('create end-to-end', function() {
                         }
                     }
                 };
-                return create(project, appId, appName, config)
+                return create(project, appId, appName, config, events)
                     .then(checkSymWWW)
                     .fail(function(err) {
                         if(process.platform.slice(0, 3) == 'win') {
@@ -431,7 +431,7 @@ describe('create end-to-end', function() {
                         }
                     }
                 };
-                return create(project, appId, appName, config)
+                return create(project, appId, appName, config, events)
                     .then(checkSymSubDir)
                     .fail(function(err) {
                         if(process.platform.slice(0, 3) == 'win') {
@@ -481,7 +481,7 @@ describe('create end-to-end', function() {
                         }
                     }
                 };
-                return create(project, appId, appName, config)
+                return create(project, appId, appName, config, events)
                     .then(checkSymNoConfig)
                     .fail(function(err) {
                         if(process.platform.slice(0, 3) == 'win') {


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


Mime
View raw message