cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject js commit: files were not properly generated
Date Thu, 20 Feb 2014 00:53:49 GMT
Repository: cordova-js
Updated Branches:
  refs/heads/browserify 8ff104b6f -> b1de593a5


files were not properly generated


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

Branch: refs/heads/browserify
Commit: b1de593a5f67ed6417e16679cd7b9e2dc5877736
Parents: 8ff104b
Author: Anis Kadri <anis@apache.org>
Authored: Wed Feb 19 16:53:45 2014 -0800
Committer: Anis Kadri <anis@apache.org>
Committed: Wed Feb 19 16:53:45 2014 -0800

----------------------------------------------------------------------
 tasks/lib/packager-browserify.js | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/b1de593a/tasks/lib/packager-browserify.js
----------------------------------------------------------------------
diff --git a/tasks/lib/packager-browserify.js b/tasks/lib/packager-browserify.js
index 04b982d..ecc8e9d 100644
--- a/tasks/lib/packager-browserify.js
+++ b/tasks/lib/packager-browserify.js
@@ -22,10 +22,11 @@ var bundle          = require('./bundle-browserify');
 var computeCommitId = require('./compute-commit-id');
 
 
-module.exports = function generate(platform, useWindowsLineEndings, callback) {
+module.exports = function generate(platform, useWindowsLineEndings, done) {
     computeCommitId(function(commitId) {
         var outReleaseFile, outReleaseFileStream,
-            outDebugFile, outDebugFileStream;
+            outDebugFile, outDebugFileStream,
+            releaseBundle, debugBundle;
         var time = new Date().valueOf();
 
         var libraryRelease = bundle(platform, false, commitId);
@@ -44,20 +45,23 @@ module.exports = function generate(platform, useWindowsLineEndings, callback)
{
 
         outReleaseFile = path.join('pkg', 'cordova.' + platform + '.js');
         outReleaseFileStream = fs.createWriteStream(outReleaseFile);
-        libraryRelease.bundle().pipe(outReleaseFileStream);
+        releaseBundle = libraryRelease.bundle();
+        releaseBundle.pipe(outReleaseFileStream);
 
-        libraryRelease.bundle().on('end', function() {
+        releaseBundle.on('end', function() {
           var newtime = new Date().valueOf() - time;
           console.log('generated cordova.' + platform + '.js @ ' + commitId + ' in ' + newtime
+ 'ms');
-          callback();
+          done();
         });
 
         outDebugFile = path.join('pkg', 'debug', 'cordova.' + platform + '-debug.js');
         outDebugFileStream = fs.createWriteStream(outDebugFile);
-        libraryDebug.bundle().on('end', function() {
+        debugBundle = libraryDebug.bundle();
+        debugBundle.pipe(outDebugFileStream);
+
+        outDebugFileStream.on('end', function() {
           var newtime = new Date().valueOf() - time;
           console.log('generated cordova.' + platform + '-debug.js @ ' + commitId + ' in
' + newtime + 'ms');
-          callback();
         });
     });
 }


Mime
View raw message