1
0

Gruntfile.js 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*jshint node:true */
  2. module.exports = function(grunt) {
  3. 'use strict';
  4. grunt.initConfig({
  5. pkg: grunt.file.readJSON('package.json'),
  6. mocha: {
  7. options: {
  8. reporter: 'Nyan',
  9. run: true
  10. },
  11. mousetrap: {
  12. src: ['tests/mousetrap.html']
  13. }
  14. },
  15. complexity: {
  16. options: {
  17. errorsOnly: false,
  18. cyclomatic: 10,
  19. halstead: 30,
  20. maintainability: 85
  21. },
  22. generic: {
  23. src: [
  24. 'mousetrap.js'
  25. ]
  26. },
  27. plugins: {
  28. src: [
  29. 'plugins/**/*.js',
  30. '!plugins/**/tests/**',
  31. '!plugins/**/*.min.js'
  32. ]
  33. }
  34. }
  35. });
  36. grunt.loadNpmTasks('grunt-complexity');
  37. grunt.loadNpmTasks('grunt-mocha');
  38. grunt.registerTask('default', [
  39. 'complexity',
  40. 'mocha'
  41. ]);
  42. };