cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [31/45] js commit: files were not properly generated
Date Thu, 24 Apr 2014 21:11:16 GMT
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/202b92fb
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/202b92fb
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/202b92fb

Branch: refs/heads/master
Commit: 202b92fb1e2023a547d7c6f654d377f8e8c06852
Parents: 061d7d2
Author: Anis Kadri <anis@apache.org>
Authored: Wed Feb 19 16:53:45 2014 -0800
Committer: Anis Kadri <anis@apache.org>
Committed: Thu Mar 27 15:20:22 2014 +0100

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


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/202b92fb/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