UNPKG

1.16 kBJavaScriptView Raw
1'use strict';
2
3module.exports = function (grunt) {
4
5 // Project configuration.
6 grunt.initConfig({
7 nodeunit: {
8 files: ['test/**/*_test.js']
9 },
10 jshint: {
11 options: {
12 jshintrc: '.jshintrc'
13 },
14 gruntfile: {
15 src: 'Gruntfile.js'
16 },
17 lib: {
18 src: ['lib/**/*.js']
19 },
20 test: {
21 src: ['test/**/*.js']
22 }
23 },
24 watch: {
25 gruntfile: {
26 files: '<%= jshint.gruntfile.src %>',
27 tasks: ['jshint:gruntfile']
28 },
29 lib: {
30 files: '<%= jshint.lib.src %>',
31 tasks: ['jshint:lib', 'nodeunit']
32 },
33 test: {
34 files: '<%= jshint.test.src %>',
35 tasks: ['jshint:test', 'nodeunit']
36 }
37 }
38 });
39
40 // These plugins provide necessary tasks.
41 grunt.loadTasks('./tasks');
42 grunt.loadNpmTasks('grunt-contrib-nodeunit');
43 grunt.loadNpmTasks('grunt-contrib-jshint');
44 grunt.loadNpmTasks('grunt-contrib-watch');
45
46 // Default task.
47 grunt.registerTask('default', ['jshint', 'nodeunit']);
48
49 // Default task.
50 grunt.registerTask('test', ['jshint', 'nodeunit']);
51};