You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by an...@apache.org on 2014/04/24 23:14:03 UTC

[05/28] git commit: cleanup

cleanup


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

Branch: refs/heads/master
Commit: 14df7fd4ea2953cd5712031a3b1e54c8371a75ca
Parents: 03bc66c
Author: Anis Kadri <an...@apache.org>
Authored: Tue Mar 18 17:48:03 2014 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Tue Mar 18 17:48:03 2014 -0700

----------------------------------------------------------------------
 src/prepare.js | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/14df7fd4/src/prepare.js
----------------------------------------------------------------------
diff --git a/src/prepare.js b/src/prepare.js
index 60e8c64..1ba69a5 100644
--- a/src/prepare.js
+++ b/src/prepare.js
@@ -188,7 +188,7 @@ module.exports = function handlePrepare(project_dir, platform, plugins_dir, www_
             var fsPath = path.join.apply(path, pathParts);
             var scriptPath = path.join(pluginDir, fsPath);
 
-            libraryRelease.add(fsPath);
+            libraryRelease.add(scriptPath);
 
             var scriptContent = fs.readFileSync(scriptPath, 'utf-8');
             scriptContent = 'cordova.define("' + moduleName + '", function(require, exports, module) { ' + scriptContent + '\n});\n';
@@ -246,7 +246,7 @@ module.exports = function handlePrepare(project_dir, platform, plugins_dir, www_
     var outReleaseFile = path.join(wwwDir, 'cordova-b.js');
     var outReleaseFileStream = fs.createWriteStream(outReleaseFile);
     var commitId = 'N/A';
-    var newTime = null;
+    var time = new Date().valueOf();
 
     writeLicenseHeader(outReleaseFileStream, platform, commitId);
     
@@ -255,14 +255,13 @@ module.exports = function handlePrepare(project_dir, platform, plugins_dir, www_
     releaseBundle.pipe(outReleaseFileStream);
 
     releaseBundle.on('end', function() {
-      console.log('end');
-      newtime = new Date().valueOf() - time;
+      var newtime = new Date().valueOf() - time;
       plugman.emit('verbose', 'generated cordova.' + platform + '.js @ ' + commitId + ' in ' + newtime + 'ms');
     });
 
     releaseBundle.on('error', function(err) {
-      newtime = new Date().valueOf() - time;
-      console.log('error while generating cordova.js');
+      var newtime = new Date().valueOf() - time;
+      console.log('error while generating cordova_b.js');
       plugman.emit('verbose', 'error while generating cordova.js');
     });
 };