-
Notifications
You must be signed in to change notification settings - Fork 167
/
Gruntfile.js
40 lines (38 loc) · 981 Bytes
/
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
module.exports = function (grunt) {
'use strict';
grunt.option('stack', true);
grunt.initConfig({
benchmark: {
all: {
src: ['benchmarks/*.js'],
options: { times: 10 }
}
},
nodeunit: {
files: ['test/*_test.js']
},
jshint: {
options: {
jshintrc: '.jshintrc'
},
gruntfile: {
src: 'Gruntfile.js'
},
lib: {
src: ['lib/**/*.js']
},
test: {
src: ['test/**/*_test.js']
}
}
});
// Dynamic alias task to nodeunit. Run individual tests with: grunt test:events
grunt.registerTask('test', function (file) {
grunt.config('nodeunit.files', String(grunt.config('nodeunit.files')).replace('*', file || '*'));
grunt.task.run('nodeunit');
});
grunt.loadNpmTasks('grunt-benchmark');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-nodeunit');
grunt.registerTask('default', ['jshint', 'nodeunit']);
};