Permalink
Browse files

fixed another windows vs. unix path issue.

  • Loading branch information...
1 parent a56d60e commit 75eb826d1137f76276c5cec3f5197580949d1937 @purplecabbage purplecabbage committed Nov 15, 2012
Showing with 14 additions and 17 deletions.
  1. +1 −1 Jakefile
  2. +13 −16 build/packager.js
View
2 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);
View
29 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);
}
//------------------------------------------------------------------------------

0 comments on commit 75eb826

Please sign in to comment.