cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [04/28] git commit: fixing path
Date Thu, 24 Apr 2014 21:14:02 GMT
fixing path


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

Branch: refs/heads/master
Commit: 03bc66ca659b7ccc128c3e5973ce88a18150ea2c
Parents: eb4bc45
Author: Anis Kadri <anis@apache.org>
Authored: Tue Mar 18 17:35:27 2014 -0700
Committer: Anis Kadri <anis@apache.org>
Committed: Tue Mar 18 17:35:27 2014 -0700

----------------------------------------------------------------------
 package.json   |  2 --
 src/prepare.js | 21 ++++++++++++++-------
 2 files changed, 14 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/03bc66ca/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index 18b3c76..22a039a 100644
--- a/package.json
+++ b/package.json
@@ -32,8 +32,6 @@
     "rc": "0.3.0",
     "tar": "0.1.x",
     "request": "2.22.0",
-    "browserify": "3.2.0",
-    "through": "2.3.4",
     "cordova-js": "3.x.x"
   },
   "devDependencies": {

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/03bc66ca/src/prepare.js
----------------------------------------------------------------------
diff --git a/src/prepare.js b/src/prepare.js
index e946cfb..60e8c64 100644
--- a/src/prepare.js
+++ b/src/prepare.js
@@ -32,8 +32,8 @@ var platform_modules   = require('./platforms'),
     util               = require('util'),
     plugman            = require('../plugman'),
     et                 = require('elementtree'),
-//    bundle             = require('cordova-js/tasks/lib/bundle-browserify');
-//    writeLicenseHeader = require('cordova-js/tasks/lib/write-license-header');
+    bundle             = require('cordova-js/tasks/lib/bundle-browserify');
+    writeLicenseHeader = require('cordova-js/tasks/lib/write-license-header');
 
 // Called on --prepare.
 // Sets up each plugin's Javascript code to be loaded properly.
@@ -243,19 +243,26 @@ module.exports = function handlePrepare(project_dir, platform, plugins_dir,
www_
     }
 
     /* begin browserify */
-    var outReleaseFile = path.join('pkg', 'cordova.' + platform + '.js');
+    var outReleaseFile = path.join(wwwDir, 'cordova-b.js');
     var outReleaseFileStream = fs.createWriteStream(outReleaseFile);
     var commitId = 'N/A';
-    
+    var newTime = null;
+
     writeLicenseHeader(outReleaseFileStream, platform, commitId);
-     
+    
     releaseBundle = libraryRelease.bundle();
 
     releaseBundle.pipe(outReleaseFileStream);
 
     releaseBundle.on('end', function() {
-      var newtime = new Date().valueOf() - time;
+      console.log('end');
+      newtime = new Date().valueOf() - time;
       plugman.emit('verbose', 'generated cordova.' + platform + '.js @ ' + commitId + ' in
' + newtime + 'ms');
     });
-    /* end browserify */
+
+    releaseBundle.on('error', function(err) {
+      newtime = new Date().valueOf() - time;
+      console.log('error while generating cordova.js');
+      plugman.emit('verbose', 'error while generating cordova.js');
+    });
 };


Mime
View raw message