forked from tuupola/jquery_chained
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
73 lines (69 loc) · 2.62 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
module.exports = function(grunt) {
"use strict";
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
uglify : {
options: {
report: "gzip",
banner: "/*! Chained <%= pkg.version %> - MIT license - Copyright 2010-2013 Mika Tuupola */\n"
},
target: {
files: {
"jquery.chained.min.js" : "jquery.chained.js",
"jquery.chained.remote.min.js" : "jquery.chained.remote.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: {
"jquery-1.9.1": {
src: ["jquery.chained.js", "jquery.chained.remote.js"],
options: {
helpers: "test/spec/*Helper.js",
specs: "test/spec/*Spec.js",
vendor: ["test/vendor/jquery-1.9.1.js", "test/vendor/jasmine-jquery.js"]
}
},
"jquery-1.10.2": {
src: ["jquery.chained.js", "jquery.chained.remote.js"],
options: {
helpers: "test/spec/*Helper.js",
specs: "test/spec/*Spec.js",
vendor: ["test/vendor/jquery-1.10.2.js", "test/vendor/jasmine-jquery.js"]
}
},
"jquery-2.0.3": {
src: ["jquery.chained.js", "jquery.chained.remote.js"],
options: {
helpers: "test/spec/*Helper.js",
specs: "test/spec/*Spec.js",
vendor: ["test/vendor/jquery-2.0.3.js", "test/vendor/jasmine-jquery.js"]
}
},
"zepto-1.0.1": {
src: ["jquery.chained.js", "jquery.chained.remote.js"],
options: {
helpers: "test/spec/*Helper.js",
specs: "test/spec/*Spec.js",
vendor: ["test/vendor/zepto-1.0.1.js", "test/vendor/zepto-selector.js",
"test/vendor/jasmine-zepto.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("default", ["test", "uglify"]);
};