From d3b010d26ef3622769c3b7abb26718165ee75621 Mon Sep 17 00:00:00 2001 From: Ian Gilman Date: Thu, 14 Feb 2013 10:21:35 -0800 Subject: [PATCH] Added min, qunit, server, and watch tasks to grunt --- grunt.js | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/grunt.js b/grunt.js index f734d18b..57d32846 100644 --- a/grunt.js +++ b/grunt.js @@ -1,6 +1,7 @@ module.exports = function(grunt) { - var distribution = "openseadragon.js", + var distribution = "build/openseadragon.js", + minified = "build/openseadragon.min.js", sources = [ "src/openseadragon.js", "src/eventhandler.js", @@ -39,6 +40,23 @@ module.exports = function(grunt) { dest: distribution } }, + min: { + openseadragon: { + src: [ distribution ], + dest: minified + } + }, + qunit: { + all: [ "http://localhost:8000/test/test.html" ] + }, + server: { + port: 8000, + base: "." + }, + watch: { + files: [ "grunt.js", "src/*.js" ], + tasks: "default" + }, lint: { beforeconcat: sources, afterconcat: [ distribution ] @@ -64,8 +82,10 @@ module.exports = function(grunt) { } }); - // Default task. - grunt.registerTask('default', 'lint:beforeconcat concat lint:afterconcat'); + grunt.registerTask("default", "lint:beforeconcat concat lint:afterconcat min"); -}; \ No newline at end of file + // Test task. + grunt.registerTask("test", "default server qunit"); + +};