-
Notifications
You must be signed in to change notification settings - Fork 12
/
Gruntfile.js
58 lines (49 loc) · 1.02 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
/**
* @fileOverview Definition file for grunt tasks.
*/
// Core.
var path = require('path');
module.exports = function (grunt) {
// Always output stack traces.
grunt.option('stack', true);
grunt.initConfig({
clean: [
'build',
'test/scratch'
],
eslint: {
target: [
'**/*.js',
'!**/node_modules/**',
'!build/**',
'!test/scratch/**'
]
},
mochaTest: {
test: {
options: {
reporter: 'spec',
quiet: false,
clearRequireCache: false,
require: [
path.join(__dirname, 'test/mochaInit.js')
]
},
src: [
'test/**/*.spec.js'
]
}
}
});
// Loads local tasks for this module.
grunt.loadTasks('tasks');
// Loading NPM module grunt tasks.
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-eslint');
grunt.loadNpmTasks('grunt-mocha-test');
grunt.registerTask('test', [
'clean',
'eslint',
'mochaTest'
]);
};