cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject [1/2] js commit: packager will use windows line endings if param set
Date Wed, 09 Jan 2013 01:41:42 GMT
packager will use windows line endings if param set


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

Branch: refs/heads/master
Commit: 70ecba7ca2ecbe1b1814f6a8bd95212115251ae0
Parents: 0de682e
Author: Jesse MacFadyen <purplecabbage@gmail.com>
Authored: Tue Jan 8 17:39:45 2013 -0800
Committer: Jesse MacFadyen <purplecabbage@gmail.com>
Committed: Tue Jan 8 17:39:45 2013 -0800

----------------------------------------------------------------------
 Jakefile          |    4 ++--
 build/packager.js |    5 ++++-
 2 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/70ecba7c/Jakefile
----------------------------------------------------------------------
diff --git a/Jakefile b/Jakefile
index 9aa8710..23ba7d3 100644
--- a/Jakefile
+++ b/Jakefile
@@ -87,10 +87,10 @@ task('build', ['clean', 'hint', 'update-version'], function () {
         
         console.log("building " + commitId);
 
-        packager.generate("windows8",commitId);
+        packager.generate("windows8",commitId,true);
         packager.generate("blackberry",commitId);
         packager.generate("ios",commitId);
-        packager.generate("windowsphone",commitId);
+        packager.generate("windowsphone",commitId,true);
         packager.generate("android",commitId);
         packager.generate("bada",commitId);
         packager.generate("tizen",commitId);

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/70ecba7c/build/packager.js
----------------------------------------------------------------------
diff --git a/build/packager.js b/build/packager.js
index f7e42d0..f5695cb 100644
--- a/build/packager.js
+++ b/build/packager.js
@@ -24,11 +24,14 @@ var path  = require('path')
 var packager = module.exports
 
 //------------------------------------------------------------------------------
-packager.generate = function(platform, commitId) {
+packager.generate = function(platform, commitId, useWindowsLineEndings) {
     var outFile;
     var time = new Date().valueOf();
 
     var libraryRelease = packager.bundle(platform, false, commitId);
+    if(useWindowsLineEndings) {
+        libraryRelease = libraryRelease.split(/\r?\n/).join("\r\n");
+    }
     var libraryDebug   = packager.bundle(platform, true, commitId);
     
     time = new Date().valueOf() - time;


Mime
View raw message