-
Notifications
You must be signed in to change notification settings - Fork 1
/
Gruntfile.js
54 lines (48 loc) · 1.25 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
'use strict';
var path = require('path');
module.exports = function(grunt) {
grunt.initConfig({
jshint: {
all: [
'Gruntfile.js',
'lib/*.js'],
options: {
jshintrc: '.jshintrc'
}
},
jsbeautifier: {
files: ['package.json', 'Gruntfile.js', 'tasks/**/*.js'],
options: {
'indent_size': 2,
'indent_char': ' ',
'indent_level': 0,
'indent_with_tabs': false,
'preserve_newlines': true,
'max_preserve_newlines': 10,
'jslint_happy': false,
'brace_style': 'collapse',
'keep_array_indentation': false,
'keep_function_indentation': false,
'space_before_conditional': true,
'eval_code': false,
'indent_case': false,
'unescape_strings': false
}
},
// Unit tests.
mochacli: {
options: {
require: ['should'],
reporter: 'nyan', // 'landing', 'spec'
color: true,
bail: true
},
all: ['test/*.js']
}
});
grunt.loadTasks('tasks');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-mocha-cli');
grunt.loadNpmTasks('grunt-jsbeautifier');
grunt.registerTask('default', ['jsbeautifier', 'jshint', 'mochacli']);
};