Now zipping and taring ("grunt package")

This commit is contained in:
Ian Gilman 2013-02-15 10:58:57 -08:00
parent d179325f71
commit 2d78e012a0
3 changed files with 21 additions and 2 deletions

2
.gitignore vendored
View File

@ -1,3 +1,5 @@
*.sublime-workspace *.sublime-workspace
node_modules node_modules
build/ build/
openseadragon.zip
openseadragon.tar

View File

@ -1,5 +1,7 @@
module.exports = function(grunt) { module.exports = function(grunt) {
grunt.loadNpmTasks("grunt-contrib-compress");
var distribution = "build/openseadragon.js", var distribution = "build/openseadragon.js",
minified = "build/openseadragon.min.js", minified = "build/openseadragon.min.js",
sources = [ sources = [
@ -50,6 +52,18 @@ module.exports = function(grunt) {
dest: minified dest: minified
} }
}, },
compress: {
zip: {
files: {
"openseadragon.zip": "build/**"
}
},
tar: {
files: {
"openseadragon.tar": "build/**"
}
}
},
qunit: { qunit: {
all: [ "http://localhost:8000/test/test.html" ] all: [ "http://localhost:8000/test/test.html" ]
}, },
@ -99,4 +113,6 @@ module.exports = function(grunt) {
// Test task. // Test task.
grunt.registerTask("test", "default server qunit"); grunt.registerTask("test", "default server qunit");
// Package task.
grunt.registerTask("package", "default compress");
}; };

View File

@ -5,7 +5,8 @@
"dependencies": { "dependencies": {
"grunt": "0.3.17", "grunt": "0.3.17",
"qunitjs": "1.11.0", "qunitjs": "1.11.0",
"phantomjs": "1.8.1-3" "phantomjs": "1.8.1-3",
"grunt-contrib-compress": "0.3.3"
}, },
"scripts": { "scripts": {
"test": "grunt test" "test": "grunt test"