liudong
2023-05-29 340f156319b863525e50e900c58e59b86ecb3d5e
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
'use strict';
 
module.exports = function(grunt) {
 
  grunt.initConfig({
    jshint: {
      options: {
        jshintrc: '.jshintrc',
      },
      all: ['*.js', 'test/*.js'],
    },
    nodeunit: {
      util: ['test/index.js']
    },
    watch: {
      all: {
        files: ['<%= jshint.all %>'],
        tasks: ['test'],
      },
    },
  });
 
  grunt.loadNpmTasks('grunt-contrib-jshint');
  grunt.loadNpmTasks('grunt-contrib-nodeunit');
  grunt.loadNpmTasks('grunt-contrib-watch');
 
  grunt.registerTask('test', ['jshint', 'nodeunit']);
  grunt.registerTask('default', ['test', 'watch']);
 
};