-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
45 lines (35 loc) · 956 Bytes
/
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
module.exports = function (grunt) {
'use strict';
// Run in force mode to not die on individual error
var env = process.env.ENV || 'dev';
if (env === 'dev') {
grunt.option('force', true);
grunt.option('stack', true);
}
// load task definitions
if ('TRAVIS' in process.env) {
grunt.option('force', false);
}
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-complexity');
grunt.loadNpmTasks('grunt-plato');
function config (name) {
return grunt.file.readJSON('./grunt/configs/' + name + '.json');
}
grunt.initConfig({
// Linting
'jshint': config('jshint'),
'complexity': config('complexity'),
'plato': config('plato'),
'notify_hooks': {
'options': {
'enabled': true,
'title': 'Wunderlist'
}
}
});
// Linter
grunt.registerTask('lint', ['jshint', 'complexity']);
// Default task
grunt.registerTask('default', ['lint']);
};