You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2012/11/15 07:33:45 UTC

[1/3] js commit: fixed another windows vs. unix path issue.

Updated Branches:
  refs/heads/master ce50b7263 -> 75eb826d1


fixed another windows vs. unix path issue.


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

Branch: refs/heads/master
Commit: 75eb826d1137f76276c5cec3f5197580949d1937
Parents: a56d60e
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Wed Nov 14 22:30:12 2012 -0800
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Wed Nov 14 22:30:12 2012 -0800

----------------------------------------------------------------------
 Jakefile          |    2 +-
 build/packager.js |   29 +++++++++++++----------------
 2 files changed, 14 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/75eb826d/Jakefile
----------------------------------------------------------------------
diff --git a/Jakefile b/Jakefile
index 9ec9282..9aa8710 100644
--- a/Jakefile
+++ b/Jakefile
@@ -70,7 +70,7 @@ task('clean', ['set-cwd'], function () {
     var DEPLOY = path.join(__dirname,"pkg");
     var cmd = 'rm -rf ' + DEPLOY + ' && ' +
               'mkdir ' + DEPLOY + ' && ' +
-              'mkdir ' + DEPLOY + '/debug';
+              'mkdir ' + path.join(DEPLOY ,'debug');
 
     childProcess.exec(cmd,complete);
 }, true);

http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/75eb826d/build/packager.js
----------------------------------------------------------------------
diff --git a/build/packager.js b/build/packager.js
index 68e66c3..f7e42d0 100644
--- a/build/packager.js
+++ b/build/packager.js
@@ -25,22 +25,20 @@ var packager = module.exports
 
 //------------------------------------------------------------------------------
 packager.generate = function(platform, commitId) {
-    var time = new Date().valueOf()
-    
-    var libraryRelease = packager.bundle(platform, false, commitId)
-    var libraryDebug   = packager.bundle(platform, true, commitId)
-    
-    time = new Date().valueOf() - time
-    
-    var outFile
+    var outFile;
+    var time = new Date().valueOf();
+
+    var libraryRelease = packager.bundle(platform, false, commitId);
+    var libraryDebug   = packager.bundle(platform, true, commitId);
     
-    outFile = path.join('pkg', 'cordova.' + platform + '.js')
-    fs.writeFileSync(outFile, libraryRelease, 'utf8')
+    time = new Date().valueOf() - time;
+    outFile = path.join('pkg', 'cordova.' + platform + '.js');
+    fs.writeFileSync(outFile, libraryRelease, 'utf8');
     
-    outFile = path.join('pkg/debug', 'cordova.' + platform + '-debug.js')
-    fs.writeFileSync(outFile, libraryDebug, 'utf8')
+    outFile = path.join('pkg', 'debug', 'cordova.' + platform + '-debug.js');
+    fs.writeFileSync(outFile, libraryDebug, 'utf8');
     
-    console.log('generated platform: ' + platform + ' in ' + time + 'ms')
+    console.log('generated platform: ' + platform + ' in ' + time + 'ms');
 }
 
 //------------------------------------------------------------------------------
@@ -164,9 +162,8 @@ function collectFiles(dir, id) {
 function writeScript(oFile, fileName, debug) {
     var contents = getContents(fileName, 'utf8')
 
-    contents = stripHeader(contents, fileName)
-    
-    writeContents(oFile, fileName, contents, debug)    
+    contents = stripHeader(contents, fileName);
+    writeContents(oFile, fileName, contents, debug);
 }
 
 //------------------------------------------------------------------------------