forked from Redsmin/proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgrunt.js
58 lines (52 loc) · 1.15 KB
/
grunt.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
module.exports = function(grunt) {
// Project configuration
grunt.initConfig({
pkg: '<json:package.json>',
lint: {
all: ['*.js', 'lib/**/*.js', 'test/**/*.js']
},
jshint: {
options: {
curly: true,
es5: true,
eqeqeq: true,
immed: true,
latedef: true,
laxcomma: true,
newcap: false,
noarg: true,
sub: true,
undef: true,
eqnull: true,
browser: false
},
globals: {
module: true,
require:true,
exports:true,
console:true,
__dirname:true,
process:true
}
},
watch: {
files: ['<config:lint.all>'],
tasks: 'lint test'
},
test: {
all: ['test/**/*.js']
}
});
// http://blog.fgribreau.com/2012/06/how-to-get-growl-notifications-from.html
var growl = require('growl');
['warn', 'fatal'].forEach(function(level) {
grunt.utils.hooker.hook(grunt.fail, level, function(opt) {
growl(opt.name, {
title: opt.message,
image: 'Console'
});
});
});
// Default task.
grunt.registerTask('default', 'lint test');
};