1
0
mirror of https://github.com/videojs/video.js.git synced 2025-01-25 11:13:52 +02:00

Merge branch 'windows-dist' of git://github.com/christophercurrie/video.js into christophercurrie-windows-dist

Conflicts:
	package.json
This commit is contained in:
Steve Heffernan 2014-01-23 17:47:19 -08:00
commit d73bfb80b7
2 changed files with 17 additions and 19 deletions

View File

@ -147,6 +147,17 @@ module.exports = function(grunt) {
baseURL: 'https://github.com/videojs/video.js/blob/master/'
}
}
},
zip: {
dist: {
router: function (filepath) {
var path = require('path');
return path.relative('dist', filepath);
},
compression: 'DEFLATE',
src: ['dist/video-js/**/*'],
dest: 'dist/video-js-' + version.full + '.zip'
}
}
});
@ -161,6 +172,7 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('contribflow');
grunt.loadNpmTasks('grunt-karma');
grunt.loadNpmTasks('videojs-doc-generator');
grunt.loadNpmTasks('grunt-zip');
// grunt.loadTasks('./docs/tasks/');
// grunt.loadTasks('../videojs-doc-generator/tasks/');
@ -265,9 +277,7 @@ module.exports = function(grunt) {
});
});
grunt.registerTask('dist', 'Creating distribution', function(){
var exec = require('child_process').exec;
var done = this.async();
grunt.registerTask('dist-copy', 'Assembling distribution', function(){
var css, jsmin, jsdev, cdnjs;
// Manually copy each source file
@ -305,21 +315,8 @@ module.exports = function(grunt) {
// GA Tracking Pixel (manually building the pixel URL)
cdnjs = uglify.minify('src/js/cdn.js').code.replace('v0.0.0', 'v'+version.full);
grunt.file.write('dist/cdn/video.js', jsmin + cdnjs);
// Zip up into video-js-VERSION.zip
exec('cd dist && zip -r video-js-'+version.full+'.zip video-js && cd ..', { maxBuffer: 500*1024 }, function(err, stdout, stderr){
if (err) {
grunt.warn(err);
done(false);
}
if (stdout) {
grunt.log.writeln(stdout);
}
done();
});
});
grunt.registerTask('dist', 'Creating distribution', ['dist-copy', 'zip:dist']);
};

View File

@ -35,6 +35,7 @@
"grunt-karma": "~0.4.4",
"karma-qunit": "~0.0.2",
"videojs-doc-generator": "0.0.1",
"qunitjs": "~1.12.0"
"qunitjs": "~1.12.0",
"grunt-zip": "0.10.2"
}
}