-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
82 lines (71 loc) · 1.87 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
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
qunit: {
all: {
options: {
urls: [
'http://localhost:8000/test/models/test.html',
'http://localhost:8000/test/rooms/test.html',
'http://localhost:8000/test/rooms/testManager.html',
'http://localhost:8000/test/suite/testSuite.html',
]
}
}
},
connect: {
server: {
options: {
port: 8000,
base: '.'
}
}
},
requirejs: {
compile: {
options: {
baseUrl: "app/js",
mainConfigFile: "app/js/main.js",
name: "main",
out: "app/build/optimized.min.js",
}
}
},
jshint: {
// define the files to lint
files: ['gruntfile.js', 'app/**/*.js', '!app/**/*.min.js', '!app/**/require.js'],
// configure JSHint (documented at http://www.jshint.com/docs/)
options: {
// more options here if you want to override JSHint defaults
bitwise: true,
curly: true,
undef: true,
unused: true,
eqeqeq: true,
forin: false,
latedef: true,
maxcomplexity: 20,
maxdepth: 3,
noarg: true,
predef: ["define", "performance", "document", "window", "requestAnimationFrame", "require", "requirejs", "navigator"],
globals: {
console: false,
module: false,
},
reporter:'jslint',
reporterOutput: 'lint/hints.xml'
}
}
});
grunt.loadNpmTasks('grunt-contrib-connect');
// Load the plugin that provides the "qunit" task.
grunt.loadNpmTasks('grunt-contrib-qunit');
// Load the plugin that provides the "requirejs" task.
grunt.loadNpmTasks('grunt-contrib-requirejs');
// Load the plugin that provides the "jshint" task.
grunt.loadNpmTasks('grunt-contrib-jshint');
// Default task(s).
grunt.registerTask('default', ['connect', 'qunit', 'jshint', 'requirejs']);
grunt.registerTask('test', ['connect', 'qunit']);
};