grunt.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*global config:true, task:true*/
  2. config.init({
  3. pkg: '<json:package.json>',
  4. meta: {
  5. title: 'JavaScript Sync/Async forEach',
  6. license: ['MIT'],
  7. copyright: 'Copyright (c) 2012 "Cowboy" Ben Alman',
  8. banner: '/* {{meta.title}} - v{{pkg.version}} - {{today "m/d/yyyy"}}\n' +
  9. ' * {{pkg.homepage}}\n' +
  10. ' * {{{meta.copyright}}}; Licensed {{join meta.license}} */'
  11. },
  12. concat: {
  13. 'dist/ba-foreach.js': ['<banner>', '<file_strip_banner:lib/foreach.js>']
  14. },
  15. min: {
  16. 'dist/ba-foreach.min.js': ['<banner>', 'dist/ba-foreach.js']
  17. },
  18. test: {
  19. files: ['test/**/*.js']
  20. },
  21. lint: {
  22. files: ['grunt.js', 'lib/**/*.js', 'test/**/*.js']
  23. },
  24. watch: {
  25. files: '<config:lint.files>',
  26. tasks: 'lint:files test:files'
  27. },
  28. jshint: {
  29. options: {
  30. curly: true,
  31. eqeqeq: true,
  32. immed: true,
  33. latedef: true,
  34. newcap: true,
  35. noarg: true,
  36. sub: true,
  37. undef: true,
  38. eqnull: true
  39. },
  40. globals: {
  41. exports: true
  42. }
  43. },
  44. uglify: {}
  45. });
  46. // Default task.
  47. task.registerTask('default', 'lint:files test:files concat min');