forked from cloudflarearchive/backgrid-paginator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
115 lines (106 loc) · 2.59 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
/*
backgrid-paginator
http://github.com/wyuenho/backgrid-paginator
Copyright (c) 2013 Jimmy Yuen Ho Wong and contributors
Licensed under the MIT license.
*/
// jshint globalstrict:true, node:true
"use strict";
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
clean: {
options: {
force: true
},
api: [
"api/**/*"
],
"default": [
"*.min.*",
"test/coverage/**/*"
]
},
jasmine: {
test: {
version: "1.3.1",
src: [
"backgrid-paginator.js"
],
options: {
specs: [
"test/p*.js"
],
template: require("grunt-template-jasmine-istanbul"),
templateOptions: {
coverage: "test/coverage/coverage.json",
report: {
type: "html",
options: {
dir: "test/coverage"
}
}
},
vendor: [
"test/vendor/js/jquery.js",
"test/vendor/js/underscore.js",
"test/vendor/js/backbone.js",
"test/vendor/js/backgrid.js",
'test/vendor/js/backbone-pageable.js'
]
}
}
},
jsduck: {
main: {
src: ["backgrid-paginator.js"],
dest: "api",
options: {
"external": ["Backbone.Model,Backbone.Collection,Backbone.View,Backgrid.Grid,Backgrid.Column"],
"title": "backgrid-paginator",
"no-source": true,
"categories": "categories.json",
"warnings": "-no_doc",
"pretty-json": true
}
}
},
recess: {
csslint: {
options: {
compile: true
},
files: {
"backgrid-paginator.css": ["backgrid-paginator.css"]
}
},
"default": {
options: {
compress: true
},
files: {
"backgrid-paginator.min.css": ["backgrid-paginator.css"]
}
}
},
uglify: {
options: {
mangle: true,
compress: true,
preserveComments: "some"
},
"default": {
files: {
"backgrid-paginator.min.js": ["backgrid-paginator.js"]
}
}
}
});
grunt.loadNpmTasks("grunt-contrib-clean");
grunt.loadNpmTasks("grunt-contrib-uglify");
grunt.loadNpmTasks("grunt-recess");
grunt.loadNpmTasks("grunt-jsduck");
grunt.loadNpmTasks("grunt-contrib-jasmine");
grunt.registerTask("dist", ["uglify", "recess"]);
grunt.registerTask("default", ["clean", "jsduck", "dist", "jasmine"]);
};