Gruntfile.js   A
last analyzed

Complexity

Total Complexity 2
Complexity/F 1

Size

Lines of Code 40
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 0
c 1
b 0
f 0
nc 1
dl 0
loc 40
rs 10
wmc 2
mnd 0
bc 2
fnc 2
bpm 1
cpm 1
noi 0

1 Function

Rating   Name   Duplication   Size   Complexity  
B module.exports 0 38 1
1
'use strict';
2
3
module.exports = function(grunt) {
4
5
  grunt.loadNpmTasks('grunt-mocha-test');
6
  grunt.loadNpmTasks('grunt-release');
7
8
  grunt.initConfig({
9
    mochaTest: {
10
      test: {
11
        options: {
12
          reporter: 'spec',
13
          require: 'coffee-script'
14
        },
15
        src: ['test/**/*.coffee']
16
      }
17
    },
18
    release: {
19
      options: {
20
        tagName: 'v<%= version %>',
21
        commitMessage: 'Prepared to release <%= version %>.'
22
      }
23
    },
24
    watch: {
25
      files: ['Gruntfile.js', 'test/**/*.coffee'],
26
      tasks: ['test']
27
    }
28
  });
29
30
  grunt.event.on('watch', function(action, filepath, target) {
31
    grunt.log.writeln(target + ': ' + filepath + ' has ' + action);
32
  });
33
34
  // load all grunt tasks
35
  require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
36
37
  grunt.registerTask('test', ['mochaTest']);
38
  grunt.registerTask('test:watch', ['watch']);
39
  grunt.registerTask('default', ['test']);
40
};
41