Fixed compress and moved build to build/openseadragon

The zip and tar now go into build next to build/openseadragon
This commit is contained in:
Ian Gilman 2013-02-21 11:56:16 -08:00
parent 98e8289c9b
commit 8074b338d1
2 changed files with 16 additions and 10 deletions

View File

@ -8,8 +8,8 @@ module.exports = function(grunt) {
grunt.loadNpmTasks("grunt-contrib-connect"); grunt.loadNpmTasks("grunt-contrib-connect");
grunt.loadNpmTasks("grunt-contrib-watch"); grunt.loadNpmTasks("grunt-contrib-watch");
var distribution = "build/openseadragon.js", var distribution = "build/openseadragon/openseadragon.js",
minified = "build/openseadragon.min.js", minified = "build/openseadragon/openseadragon.min.js",
sources = [ sources = [
"src/openseadragon.js", "src/openseadragon.js",
"src/eventhandler.js", "src/eventhandler.js",
@ -60,14 +60,20 @@ module.exports = function(grunt) {
}, },
compress: { compress: {
zip: { zip: {
files: { options: {
"openseadragon.zip": "build/**" archive: "build/openseadragon.zip"
} },
files: [
{ expand: true, cwd: "build/", src: ["openseadragon/**"] }
]
}, },
tar: { tar: {
files: { options: {
"openseadragon.tar": "build/**" archive: "build/openseadragon.tar"
} },
files: [
{ expand: true, cwd: "build/", src: [ "openseadragon/**" ] }
]
} }
}, },
qunit: { qunit: {
@ -106,7 +112,7 @@ module.exports = function(grunt) {
// Copy task. // Copy task.
grunt.registerTask("copy", function() { grunt.registerTask("copy", function() {
grunt.file.recurse("images", function(abspath, rootdir, subdir, filename) { grunt.file.recurse("images", function(abspath, rootdir, subdir, filename) {
grunt.file.copy(abspath, "build/images/" + (subdir || "") + filename); grunt.file.copy(abspath, "build/openseadragon/images/" + (subdir || "") + filename);
}); });
}); });

View File

@ -11,7 +11,7 @@
<div id="qunit-fixture"></div> <div id="qunit-fixture"></div>
<div id="example"></div> <div id="example"></div>
<script src="/node_modules/grunt-contrib-qunit/test/libs/qunit.js"></script> <script src="/node_modules/grunt-contrib-qunit/test/libs/qunit.js"></script>
<script src="/build/openseadragon.min.js"></script> <script src="/build/openseadragon/openseadragon.min.js"></script>
<script src="/test/test.js"></script> <script src="/test/test.js"></script>
</body> </body>
</html> </html>