|
2 | 2 |
|
3 | 3 | module.exports = function (grunt) { |
4 | 4 |
|
5 | | - // Load all Grunt tasks. |
6 | | - require('load-grunt-tasks')(grunt); |
| 5 | + // Load all Grunt tasks. |
| 6 | + require('load-grunt-tasks')(grunt); |
7 | 7 |
|
8 | | - // Grunt configuration. |
9 | | - grunt.initConfig({ |
| 8 | + // Grunt configuration. |
| 9 | + grunt.initConfig({ |
10 | 10 |
|
11 | | - pkg: grunt.file.readJSON('package.json'), |
| 11 | + pkg: grunt.file.readJSON('package.json'), |
12 | 12 |
|
13 | | - clean: ['dist'], |
| 13 | + clean: ['dist'], |
14 | 14 |
|
15 | | - watch: { |
16 | | - scripts: { |
17 | | - files: [ |
18 | | - 'Gruntfile.js', |
19 | | - 'src/**/*.js', |
20 | | - 'tests/specs/**/*.js', |
21 | | - '!.grunt' |
22 | | - ], |
23 | | - tasks: ['jshint', 'jasmine'] |
24 | | - } |
25 | | - }, |
| 15 | + watch: { |
| 16 | + scripts: { |
| 17 | + files: [ |
| 18 | + 'Gruntfile.js', |
| 19 | + 'src/**/*.js', |
| 20 | + 'tests/specs/**/*.js', |
| 21 | + 'tests/helpers.js', |
| 22 | + '!.grunt' |
| 23 | + ], |
| 24 | + tasks: ['jshint', 'jasmine'] |
| 25 | + } |
| 26 | + }, |
26 | 27 |
|
27 | | - uglify: { |
28 | | - all: { |
29 | | - files: { |
30 | | - 'dist/jquery.checkboxes-<%= pkg.version %>.min.js': ['src/jquery.checkboxes.js'] |
| 28 | + uglify: { |
| 29 | + all: { |
| 30 | + files: { |
| 31 | + 'dist/jquery.checkboxes-<%= pkg.version %>.min.js': ['src/jquery.checkboxes.js'] |
| 32 | + }, |
| 33 | + options: { |
| 34 | + banner: '/*! checkboxes.js v<%= pkg.version %> | ' + |
| 35 | + '(c) 2013, <%= grunt.template.today("yyyy") %> Rubens Mariuzzo | ' + |
| 36 | + 'http://github.com/rmariuzzo/checkboxes.js/LICENSE */', |
| 37 | + } |
| 38 | + } |
31 | 39 | }, |
32 | | - options: { |
33 | | - banner: '/*! checkboxes.js v<%= pkg.version %> | ' + |
34 | | - '(c) 2013, <%= grunt.template.today("yyyy") %> Rubens Mariuzzo | ' + |
35 | | - 'http://github.com/rmariuzzo/checkboxes.js/LICENSE */', |
36 | | - } |
37 | | - } |
38 | | - }, |
39 | 40 |
|
40 | | - jshint: { |
41 | | - all: { |
42 | | - src: [ |
43 | | - 'Gruntfile.js', |
44 | | - 'src/**/*.js', |
45 | | - 'tests/spec/**/*.js' |
46 | | - ], |
47 | | - options: { |
48 | | - jshintrc: true |
49 | | - } |
50 | | - } |
51 | | - }, |
| 41 | + jshint: { |
| 42 | + all: { |
| 43 | + src: [ |
| 44 | + 'Gruntfile.js', |
| 45 | + 'src/**/*.js', |
| 46 | + 'tests/spec/**/*.js' |
| 47 | + ], |
| 48 | + options: { |
| 49 | + jshintrc: '<%= baseDir %>.jshintrc', |
| 50 | + reporterOutput: '' |
| 51 | + } |
| 52 | + } |
| 53 | + }, |
52 | 54 |
|
53 | | - jasmine: { |
54 | | - all: { |
55 | | - src: 'src/**/*.js', |
56 | | - options: { |
57 | | - specs: 'tests/specs/*_spec.js', |
58 | | - vendor: [ |
59 | | - 'bower_components/jquery/dist/jquery.min.js', |
60 | | - 'bower_components/jasmine-jquery/lib/jasmine-jquery.js' |
61 | | - ] |
| 55 | + jasmine: { |
| 56 | + all: { |
| 57 | + src: 'src/**/*.js', |
| 58 | + options: { |
| 59 | + specs: 'tests/specs/*_spec.js', |
| 60 | + vendor: [ |
| 61 | + 'bower_components/jquery/dist/jquery.min.js', |
| 62 | + 'bower_components/jasmine-jquery/lib/jasmine-jquery.js' |
| 63 | + ], |
| 64 | + helpers: [ |
| 65 | + 'tests/helpers.js' |
| 66 | + ] |
| 67 | + } |
| 68 | + } |
62 | 69 | } |
63 | | - } |
64 | | - } |
65 | 70 |
|
66 | | - }); |
| 71 | + }); |
67 | 72 |
|
68 | | - grunt.registerTask('default', ['jshint', 'watch']); |
69 | | - grunt.registerTask('build', ['clean', 'jshint', 'jasmine', 'uglify']); |
70 | | - grunt.registerTask('test', ['jasmine']); |
71 | | - grunt.registerTask('travis', ['jshint', 'jasmine']); |
| 73 | + grunt.registerTask('default', ['jshint', 'watch']); |
| 74 | + grunt.registerTask('build', ['clean', 'jshint', 'jasmine', 'uglify']); |
| 75 | + grunt.registerTask('test', ['jasmine']); |
| 76 | + grunt.registerTask('travis', ['jshint', 'jasmine']); |
72 | 77 |
|
73 | 78 | }; |
0 commit comments