forked from tbranyen/backbone.layoutmanager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.coffee
93 lines (78 loc) · 2.3 KB
/
Gruntfile.coffee
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
# Grunt configuration updated to latest Grunt. That means your minimum version
# necessary to run these tasks is Grunt 0.4.
#
# Please install this locally and install `grunt-cli` globally to run.
module.exports = ->
# Initialize the configuration.
@initConfig
# Empty the reports folder.
clean:
files: ["test/report"]
# Lint source, node, and test code with some sane options.
jshint:
files: ["backbone.layoutmanager.js"]
node:
files:
src: ["node/index.js"]
options:
node: true
test:
files:
src: ["test/*.js"]
options:
maxlen: false
globals:
global: true
$: true
Backbone: true
_: true
require: true
QUnit: true
start: true
stop: true
ok: true
equal: true
deepEqual: true
notEqual: true
asyncTest: true
test: true
expect: true
testUtil: true
# Allow certain options.
options: @file.readJSON ".jshintrc"
# Run QUnit tests for browser environments.
qunit:
options:
"--web-security": "no"
coverage:
src: ["backbone.layoutmanager.js"]
instrumentedFiles: "test/tmp"
htmlReport: "test/report/coverage"
coberturaReport: "test/report"
linesThresholdPct: 85
files: ["test/index.html", "!test/node.js"]
# Run QUnit tests for Node.js environments.
nodequnit:
files: ["test/*.js", "!test/dom.js"]
options:
deps: ["test/vendor/util.js"]
code: "."
testsDir: "test/"
# Want to ensure common use cases are accounted for and that we do not make
# changes that dramatically impact general performance.
benchmark:
options:
displayResults: true
all:
src: ["test/benchmark/*.js"]
dest: "test/report/benchmark_results.csv"
# Load external Grunt task plugins.
@loadNpmTasks "grunt-contrib-clean"
@loadNpmTasks "grunt-contrib-jshint"
@loadNpmTasks "grunt-qunit-istanbul"
@loadNpmTasks "grunt-nodequnit"
@loadNpmTasks "grunt-benchmark"
# Default task.
@registerTask "default", [
"clean", "jshint", "qunit", "nodequnit", "benchmark"
]