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.

40 lines
1.0 KiB

  1. module.exports = function(grunt) {
  2. 'use strict';
  3. grunt.initConfig({
  4. echo: {
  5. one: { message: 'one has changed' },
  6. two: { message: 'two has changed' },
  7. wait: { message: 'I waited 2s', wait: 2000 },
  8. interrupt: { message: 'I want to be interrupted', wait: 5000 },
  9. fail: { fail: 1, message: 'This task should fail' }
  10. },
  11. watch: {
  12. one: {
  13. files: ['lib/one.js', 'Gruntfile.js'],
  14. tasks: ['echo:one']
  15. },
  16. two: {
  17. files: ['lib/two.js'],
  18. tasks: ['echo:two']
  19. },
  20. wait: {
  21. files: ['lib/wait.js'],
  22. tasks: ['echo:wait']
  23. },
  24. interrupt: {
  25. files: ['lib/interrupt.js'],
  26. tasks: ['echo:interrupt'],
  27. options: { interrupt: true }
  28. },
  29. fail: {
  30. files: ['lib/fail.js'],
  31. tasks: ['echo:fail']
  32. }
  33. }
  34. });
  35. // Load the echo task
  36. grunt.loadTasks('../tasks');
  37. // Load this watch task
  38. grunt.loadTasks('../../../tasks');
  39. grunt.registerTask('default', ['echo']);
  40. };