forked from tuupola/lazyload
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
57 lines (53 loc) · 1.74 KB
/
Gruntfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
module.exports = function(grunt) {
"use strict";
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
uglify : {
options: {
banner: "/*! Lazy Load <%= pkg.version %> - MIT license - Copyright 2010-2015 Mika Tuupola */\n"
},
target: {
files: {
"jquery.lazyload.min.js" : "jquery.lazyload.js",
"jquery.scrollstop.min.js" : "jquery.scrollstop.js"
}
}
},
watch: {
files: ["*.js", "!*.min.js" ,"test/spec/*Spec.js"],
tasks: ["test"],
},
jshint: {
files: ["*.js", "!*.min.js" ,"test/spec/*Spec.js"],
options: {
jshintrc: ".jshintrc"
}
},
jasmine: {
src: ["jquery.lazyload.js"],
options: {
helpers: "test/spec/*Helper.js",
specs: "test/spec/*Spec.js",
vendor: ["test/vendor/jquery-1.9.0.js", "test/vendor/jasmine-jquery.js"]
}
},
connect: {
all: {
options:{
port: 8080,
hostname: "localhost",
keepalive : true
}
}
}
});
grunt.loadNpmTasks("grunt-contrib-uglify");
grunt.loadNpmTasks("grunt-contrib-jshint");
grunt.loadNpmTasks("grunt-contrib-jasmine");
grunt.loadNpmTasks("grunt-contrib-watch");
grunt.loadNpmTasks('grunt-contrib-connect');
//grunt.registerTask("test", ["jshint", "jasmine"]);
grunt.registerTask("test", ["jshint"]);
grunt.registerTask("default", ["test", "uglify"]);
grunt.registerTask("server", ["connect"]);
};