You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.1 KiB

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