forked from tuupola/lazyload
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
46 lines (42 loc) · 1.43 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
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"]
}
}
});
grunt.loadNpmTasks("grunt-contrib-uglify");
grunt.loadNpmTasks("grunt-contrib-jshint");
grunt.loadNpmTasks("grunt-contrib-jasmine");
grunt.loadNpmTasks("grunt-contrib-watch");
//grunt.registerTask("test", ["jshint", "jasmine"]);
grunt.registerTask("test", ["jshint"]);
grunt.registerTask("default", ["test", "uglify"]);
};