aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2012-03-19 23:08:56 +0100
committerJörn Zaefferer <joern.zaefferer@gmail.com>2012-03-19 23:08:56 +0100
commit2a1ee3725818c339ab45894db0347e016188e2d8 (patch)
tree8a6eceff65ccd6508ec71bb39f76dd53017de448
parent72d3aa2740ab8fc079098e8656f41e40c01ee550 (diff)
downloadjquery-ui-2a1ee3725818c339ab45894db0347e016188e2d8.tar.gz
jquery-ui-2a1ee3725818c339ab45894db0347e016188e2d8.zip
Build/grunt: Another attempt at using adm-zip. Keep the result in place, but don't (yet) use it - need to report issues to adm-zip
-rw-r--r--grunt.js26
-rw-r--r--package.json3
2 files changed, 15 insertions, 14 deletions
diff --git a/grunt.js b/grunt.js
index e7395285a..83522ebb4 100644
--- a/grunt.js
+++ b/grunt.js
@@ -308,24 +308,24 @@ task.registerMultiTask( "copy", "Copy files to destination folder and replace @V
task.registerMultiTask( "zip", "Create a zip file for release", function() {
- var done = this.async();
// TODO switch back to adm-zip for better cross-platform compability once it actually works
- // 0.1.2 doesn't compress properly (or at all)
-
- // var files = file.expand(this.file.src);
- // log.writeln("Creating zip file " + this.file.dest);
+ // 0.1.3 works, but result can't be unzipped
+ // its also a lot slower then zip program, probably due to how its used...
+ // var files = file.expand( "dist/" + this.file.src + "/**/*" );
+ // log.writeln( "Creating zip file " + this.file.dest );
- // var fs = require('fs');
- // var AdmZip = require('adm-zip');
+ // var fs = require( "fs" );
+ // var AdmZip = require( "adm-zip" );
// var zip = new AdmZip();
- // files.forEach(function(file) {
- // log.verbose.writeln('Zipping ' + file);
- // // rewrite file names from dist folder (created by build), drop the /dist part
- // zip.addFile(file.replace(/^dist/, ''), fs.readFileSync(file));
+ // files.forEach(function( file ) {
+ // log.verbose.writeln( "Zipping " + file );
+ // // rewrite file names from dist folder (created by build), drop the /dist part
+ // zip.addFile(file.replace(/^dist/, "" ), fs.readFileSync( file ) );
// });
- // zip.writeZip(this.file.dest);
- // log.writeln("Wrote " + files.length + " files to " + this.file.dest);
+ // zip.writeZip( "dist/" + this.file.dest );
+ // log.writeln( "Wrote " + files.length + " files to " + this.file.dest );
+ var done = this.async();
var dest = this.file.dest;
var src = template.process( this.file.src, config() );
utils.spawn({
diff --git a/package.json b/package.json
index cd0c9f78d..02d7a1173 100644
--- a/package.json
+++ b/package.json
@@ -29,7 +29,8 @@
"grunt": "0.2.x",
"sqwish": "0.2.x",
"request": "2.9.x",
- "csslint": "0.9.x"
+ "csslint": "0.9.x",
+ "adm-zip": "0.1.x"
},
"keywords": []
} \ No newline at end of file