-
Notifications
You must be signed in to change notification settings - Fork 283
/
Gruntfile.js
74 lines (70 loc) · 2.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
module.exports = function(grunt) {
"use strict";
require("time-grunt")(grunt);
require("load-grunt-tasks")(grunt);
grunt.registerTask("test", ["jshint", "jasmine"]);
grunt.registerTask("default", ["test", "uglify"]);
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
uglify : {
options: {
report: "gzip",
banner: "/*! Chained <%= pkg.version %> - MIT license - Copyright 2010-2017 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.12.4": {
src: ["jquery.chained.js", "jquery.chained.remote.js"],
options: {
helpers: "test/spec/*Helper.js",
specs: "test/spec/*Spec.js",
vendor: ["test/vendor/jquery-1.12.4.js", "test/vendor/jasmine-jquery.js",
"test/vendor/sinon-1.8.2.js"]
}
},
"jquery-2.2.4": {
src: ["jquery.chained.js", "jquery.chained.remote.js"],
options: {
helpers: "test/spec/*Helper.js",
specs: "test/spec/*Spec.js",
vendor: ["test/vendor/jquery-2.2.4.js", "test/vendor/jasmine-jquery.js",
"test/vendor/sinon-1.8.2.js"]
}
},
"jquery-3.2.1": {
src: ["jquery.chained.js", "jquery.chained.remote.js"],
options: {
helpers: "test/spec/*Helper.js",
specs: "test/spec/*Spec.js",
vendor: ["test/vendor/jquery-3.2.1.js", "test/vendor/jasmine-jquery.js",
"test/vendor/sinon-1.8.2.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", "test/vendor/sinon-1.8.2.js"]
// }
// }
}
});
};