forked from Financial-Times/ft-api-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
85 lines (80 loc) · 2.34 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
/*global module:true */
module.exports = function (grunt) {
'use strict';
grunt.initConfig({
/* JSHINT */
/* See http://is.gd/jshintopts for more options */
/* This follows the npm style guide at http://is.gd/npmstyle */
jshint: { /* Lint the Gruntfile, ftApi and all sub-modules */
all: [
'Gruntfile.js',
'FtApi.js',
'lib/**/*.js',
'test/**/*.js'
],
options: {
bitwise: true,
camelcase: true,
curly: true,
devel: true, /* Permit console and alert while developing. */
eqeqeq: true,
forin: true,
globals: { /* Jasmine's Globals*/
'describe': false,
'xdescribe': false,
'it': false,
'xit': false,
'beforeEach': false,
'afterEach': false,
'jasmine': false,
'spyOn': false,
'expect': false,
'waitsFor': false,
'runs': false
},
immed: true,
indent: 2,
latedef: true,
maxcomplexity: 10,
maxdepth: 2,
maxlen: 90, /* Node standard is 80, but we're hedonists */
newcap: true,
noarg: true,
node: true, /* Expect node environment */
noempty: true,
onevar: true,
plusplus: true,
quotmark: 'single', /* Use backslashes if you\'ve got to */
strict: true, /* Use one 'use strict'; per file. */
trailing: true, /* Turn 'show whitespace' on in your editor. */
undef: true,
unused: true
}
},
/* JASMINE ON NODE */
/* See https://github.com/mhevery/jasmine-node for some info */
'jasmine_node': {
specNameMatcher: 'spec', // NB. Will match '.<specNameMatcher>.js'
projectRoot: '.',
requirejs: false,
forceExit: true,
jUnit: {
report: false,
savePath : './build/reports/jasmine/',
useDotNotation: true,
consolidate: true
}
},
/* WATCH */
watch: {
files: ['**/*.js'],
tasks: ['default']
}
});
/* LOAD PLUGINS */
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-jasmine-node');
/* TARGETS */
grunt.registerTask('default', ['jshint', 'jasmine_node']);
};