Gruntfile.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * grunt-contrib-jshint
  3. * http://gruntjs.com/
  4. *
  5. * Copyright (c) 2012 "Cowboy" Ben Alman, contributors
  6. * Licensed under the MIT license.
  7. */
  8. 'use strict';
  9. module.exports = function(grunt) {
  10. // Project configuration.
  11. grunt.initConfig({
  12. jshint: {
  13. all_files: [
  14. 'Gruntfile.js',
  15. 'tasks/*.js',
  16. '<%= nodeunit.tests %>'
  17. ],
  18. individual_files: {
  19. files: [
  20. {src: 'Gruntfile.js'},
  21. {src: 'tasks/*.js'},
  22. {src: '<%= nodeunit.tests %>'},
  23. ]
  24. },
  25. options: {
  26. jshintrc: '.jshintrc',
  27. }
  28. },
  29. // Unit tests.
  30. nodeunit: {
  31. tests: ['test/*_test.js']
  32. }
  33. });
  34. // Actually load this plugin's task(s).
  35. grunt.loadTasks('tasks');
  36. // These plugins provide necessary tasks.
  37. grunt.loadNpmTasks('grunt-contrib-nodeunit');
  38. grunt.loadNpmTasks('grunt-contrib-internal');
  39. // Whenever the "test" task is run, run the "nodeunit" task.
  40. grunt.registerTask('test', ['nodeunit']);
  41. // By default, lint and run all tests.
  42. grunt.registerTask('default', ['jshint', 'test', 'build-contrib']);
  43. };