|
1 | 1 | module.exports = function (grunt) {
|
2 |
| - 'use strict'; |
| 2 | + 'use strict'; |
3 | 3 |
|
4 |
| - /* jshint -W107 */ |
| 4 | + /* jshint -W107 */ |
5 | 5 |
|
6 |
| - grunt.loadNpmTasks('grunt-mocha-test'); |
7 |
| - grunt.loadNpmTasks('grunt-mocha'); |
8 |
| - grunt.loadNpmTasks('grunt-contrib-jshint'); |
9 |
| - grunt.loadNpmTasks('grunt-continue'); |
10 |
| - grunt.loadNpmTasks('grunt-bump'); |
| 6 | + grunt.loadNpmTasks('grunt-mocha-test'); |
| 7 | + grunt.loadNpmTasks('grunt-mocha'); |
| 8 | + grunt.loadNpmTasks('grunt-contrib-jshint'); |
| 9 | + grunt.loadNpmTasks('grunt-continue'); |
| 10 | + grunt.loadNpmTasks('grunt-bump'); |
11 | 11 |
|
12 |
| - grunt.initConfig({ |
13 |
| - pkg: grunt.file.readJSON('package.json'), |
14 |
| - jshint: { |
15 |
| - all: [ |
16 |
| - 'Gruntfile.js', |
17 |
| - 'index.js', |
18 |
| - 'test/*.js', |
19 |
| - ], |
20 |
| - options: { |
21 |
| - reporter: './node_modules/jshint-path-reporter', |
22 |
| - jshintrc: '.jshintrc' |
23 |
| - } |
24 |
| - }, |
25 |
| - bump: { |
26 |
| - options: { |
27 |
| - files: ['package.json', 'bower.json'], |
28 |
| - updateConfigs: [], |
29 |
| - commit: true, |
30 |
| - commitMessage: 'release v%VERSION%', |
31 |
| - commitFiles: ['-a'], |
32 |
| - createTag: true, |
33 |
| - tagName: '%VERSION%', |
34 |
| - tagMessage: 'release %VERSION%', |
35 |
| - push: false, |
36 |
| - pushTo: 'upstream', |
37 |
| - gitDescribeOptions: '--tags --always --abbrev=1 --dirty=-d' // options to use with '$ git describe' |
38 |
| - } |
39 |
| - }, |
40 |
| - mochaTest: { |
41 |
| - options: { |
42 |
| - reporter: 'mocha-unfunk-reporter' |
43 |
| - }, |
44 |
| - pass: { |
45 |
| - src: ['test/suite.js'] |
46 |
| - }, |
47 |
| - fail : { |
48 |
| - options: { |
49 |
| - reporter: 'mocha-unfunk-reporter' |
50 |
| - }, |
51 |
| - src: ['test/fail.js'] |
52 |
| - } |
53 |
| - }, |
54 |
| - mocha: { |
55 |
| - options: { |
56 |
| - bail: true, |
57 |
| - log: true, |
58 |
| - mocha: { |
59 |
| - ignoreLeaks: false |
60 |
| - }, |
61 |
| - reporter: 'mocha-unfunk-reporter', |
62 |
| - run: true |
63 |
| - }, |
64 |
| - pass: { |
65 |
| - src: ['test/pass.html'] |
66 |
| - }, |
67 |
| - pass_amd: { |
68 |
| - options: { |
69 |
| - run: false |
70 |
| - }, |
71 |
| - src: ['test/pass-amd.html'] |
72 |
| - }, |
73 |
| - fail: { |
74 |
| - src: ['test/fail.html'] |
75 |
| - }, |
76 |
| - fail_spec : { |
77 |
| - options: { |
78 |
| - reporter: 'Spec' |
79 |
| - }, |
80 |
| - src: ['test/fail.html'] |
81 |
| - }, |
82 |
| - fail_amd : { |
83 |
| - options: { |
84 |
| - run: false |
85 |
| - }, |
86 |
| - src: ['test/fail-amd.html'] |
87 |
| - } |
88 |
| - } |
89 |
| - }); |
| 12 | + grunt.initConfig({ |
| 13 | + pkg: grunt.file.readJSON('package.json'), |
| 14 | + jshint: { |
| 15 | + all: [ |
| 16 | + 'Gruntfile.js', |
| 17 | + 'index.js', |
| 18 | + 'test/*.js', |
| 19 | + ], |
| 20 | + options: { |
| 21 | + reporter: './node_modules/jshint-path-reporter', |
| 22 | + jshintrc: '.jshintrc' |
| 23 | + } |
| 24 | + }, |
| 25 | + bump: { |
| 26 | + options: { |
| 27 | + files: ['package.json', 'bower.json'], |
| 28 | + updateConfigs: [], |
| 29 | + commit: true, |
| 30 | + commitMessage: 'release v%VERSION%', |
| 31 | + commitFiles: ['-a'], |
| 32 | + createTag: true, |
| 33 | + tagName: '%VERSION%', |
| 34 | + tagMessage: 'release %VERSION%', |
| 35 | + push: false, |
| 36 | + pushTo: 'upstream', |
| 37 | + gitDescribeOptions: '--tags --always --abbrev=1 --dirty=-d' // options to use with '$ git describe' |
| 38 | + } |
| 39 | + }, |
| 40 | + mochaTest: { |
| 41 | + options: { |
| 42 | + reporter: 'mocha-unfunk-reporter' |
| 43 | + }, |
| 44 | + pass: { |
| 45 | + src: ['test/suite.js'] |
| 46 | + }, |
| 47 | + fail : { |
| 48 | + options: { |
| 49 | + reporter: 'mocha-unfunk-reporter' |
| 50 | + }, |
| 51 | + src: ['test/fail.js'] |
| 52 | + } |
| 53 | + }, |
| 54 | + mocha: { |
| 55 | + options: { |
| 56 | + bail: true, |
| 57 | + log: true, |
| 58 | + mocha: { |
| 59 | + ignoreLeaks: false |
| 60 | + }, |
| 61 | + reporter: 'mocha-unfunk-reporter', |
| 62 | + run: true |
| 63 | + }, |
| 64 | + pass: { |
| 65 | + src: ['test/pass.html'] |
| 66 | + }, |
| 67 | + pass_amd: { |
| 68 | + options: { |
| 69 | + run: false |
| 70 | + }, |
| 71 | + src: ['test/pass-amd.html'] |
| 72 | + }, |
| 73 | + fail: { |
| 74 | + src: ['test/fail.html'] |
| 75 | + }, |
| 76 | + fail_spec : { |
| 77 | + options: { |
| 78 | + reporter: 'Spec' |
| 79 | + }, |
| 80 | + src: ['test/fail.html'] |
| 81 | + }, |
| 82 | + fail_amd : { |
| 83 | + options: { |
| 84 | + run: false |
| 85 | + }, |
| 86 | + src: ['test/fail-amd.html'] |
| 87 | + } |
| 88 | + } |
| 89 | + }); |
90 | 90 |
|
91 |
| - grunt.registerTask('pass', ['mochaTest:pass', 'mocha:pass', 'mocha:pass_amd']); |
92 |
| - grunt.registerTask('fail', ['mochaTest:fail', 'mocha:fail', 'mocha:fail_amd']); |
| 91 | + grunt.registerTask('pass', ['mochaTest:pass', 'mocha:pass', 'mocha:pass_amd']); |
| 92 | + grunt.registerTask('fail', ['mochaTest:fail', 'mocha:fail', 'mocha:fail_amd']); |
93 | 93 |
|
94 |
| - grunt.registerTask('run', ['build', 'mochaTest']); |
95 |
| - grunt.registerTask('dev', ['build', 'continueOn','mocha:fail', 'continueOff', 'mocha:pass']); |
| 94 | + grunt.registerTask('run', ['build', 'mochaTest']); |
| 95 | + grunt.registerTask('dev', ['build', 'continueOn','mocha:fail', 'continueOff', 'mocha:pass']); |
96 | 96 |
|
97 |
| - grunt.registerTask('edit_01', ['build', 'mochaTest:pass']); |
98 |
| - grunt.registerTask('edit_02', ['build', 'mochaTest:fail']); |
99 |
| - grunt.registerTask('edit_03', ['build', 'mocha:fail']); |
| 97 | + grunt.registerTask('edit_01', ['build', 'mochaTest:pass']); |
| 98 | + grunt.registerTask('edit_02', ['build', 'mochaTest:fail']); |
| 99 | + grunt.registerTask('edit_03', ['build', 'mocha:fail']); |
100 | 100 |
|
101 |
| - grunt.registerTask('test', ['build', 'pass', 'continueOn', 'fail', 'continueOff']); |
102 |
| - grunt.registerTask('build', ['jshint']); |
103 |
| - grunt.registerTask('default', ['test']); |
| 101 | + grunt.registerTask('test', ['build', 'pass', 'continueOn', 'fail', 'continueOff']); |
| 102 | + grunt.registerTask('build', ['jshint']); |
| 103 | + grunt.registerTask('default', ['test']); |
104 | 104 | };
|
0 commit comments