This repository has been archived by the owner on Jan 23, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Gruntfile.js
99 lines (96 loc) · 2.54 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
/*jslint indent: 4*/
/*global module*/
module.exports = function(grunt) {
'use strict';
grunt.initConfig({
uglify: {
options: {
mangle: false,
sourceMap: true
},
dist: {
files: {
'dist/jquery-domec.min.js': [
'src/jquery-domec.js'
]
}
}
},
jshint: {
all: [
'src/*.js',
'test/*.js',
'*.js'
]
},
jscs: {
src: [
'src/*.js',
'test/*.js',
'*.js'
],
options: {
config: '.jscsrc'
}
},
mocha: {
all: {
src: [
'test/*.html'
]
},
options: {
run: true
}
},
jsonlint: {
sample: {
src: [
'package.json',
'bower.json'
]
}
},
blanket: {
instrument: {
options: {},
files: {
'src-cov/': ['src/']
}
}
},
blanket_mocha: { // jshint ignore:line
all: {
src: [
'test/*.html'
],
options: {
threshold: 100,
run: true
}
}
},
shell: {
coveralls: {
options: {
stderr: false
},
command: './node_modules/.bin/mocha --require blanket --reporter mocha-lcov-reporter | ' +
'./node_modules/coveralls/bin/coveralls.js'
}
}
});
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-jslint');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-jsonlint');
grunt.loadNpmTasks('grunt-mocha');
grunt.loadNpmTasks('grunt-blanket');
grunt.loadNpmTasks('grunt-blanket-mocha');
grunt.loadNpmTasks('grunt-shell');
grunt.loadNpmTasks('grunt-jscs');
grunt.registerTask('test', ['jshint', 'jscs', 'jsonlint', 'mocha']);
grunt.registerTask('cover', ['blanket_mocha', 'shell:coveralls']);
grunt.registerTask('build', ['uglify']);
grunt.registerTask('default', ['build', 'test', 'blanket_mocha']);
};