1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 | 'use strict';
|
10 |
|
11 | module.exports = function(grunt) {
|
12 |
|
13 |
|
14 | grunt.initConfig({
|
15 | jshint: {
|
16 | allFiles: [
|
17 | 'Gruntfile.js',
|
18 | 'tasks/**/*.js',
|
19 | '<%= nodeunit.tests %>',
|
20 | ],
|
21 | individualFiles: {
|
22 | files: [
|
23 | {src: 'Gruntfile.js'},
|
24 | {src: 'tasks/**/*.js'},
|
25 | {src: '<%= nodeunit.tests %>'},
|
26 | ],
|
27 | },
|
28 | withReporterShouldFail: {
|
29 | options: {
|
30 | reporter: 'checkstyle',
|
31 | reporterOutput: 'tmp/report.xml',
|
32 | force: true,
|
33 | },
|
34 | src: ['test/fixtures/missingsemicolon.js'],
|
35 | },
|
36 | ignoresSupport: {
|
37 | src: ['test/fixtures/dontlint.txt'],
|
38 | },
|
39 | options: {
|
40 | jshintrc: '.jshintrc',
|
41 | },
|
42 | },
|
43 |
|
44 |
|
45 | nodeunit: {
|
46 | tests: ['test/*_test.js'],
|
47 | },
|
48 | });
|
49 |
|
50 |
|
51 | grunt.loadTasks('tasks');
|
52 |
|
53 |
|
54 | grunt.loadNpmTasks('grunt-contrib-nodeunit');
|
55 | grunt.loadNpmTasks('grunt-contrib-internal');
|
56 |
|
57 |
|
58 | grunt.registerTask('test', ['jshint', 'nodeunit']);
|
59 |
|
60 |
|
61 | grunt.registerTask('default', ['test', 'build-contrib']);
|
62 |
|
63 | };
|