mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-25 06:36:11 +03:00
Added min, qunit, server, and watch tasks to grunt
This commit is contained in:
parent
607a4af860
commit
d3b010d26e
28
grunt.js
28
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");
|
||||
|
||||
};
|
||||
// Test task.
|
||||
grunt.registerTask("test", "default server qunit");
|
||||
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user