grunt.js 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*global module */
  2. module.exports = function( grunt ) {
  3. 'use strict';
  4. grunt.initConfig({
  5. meta: {
  6. version: '2.7.1',
  7. banner: '/*!\n' +
  8. ' * Modernizr v<%= meta.version %>\n' +
  9. ' * www.modernizr.com\n *\n' +
  10. ' * Copyright (c) Faruk Ates, Paul Irish, Alex Sexton\n' +
  11. ' * Available under the BSD and MIT licenses: www.modernizr.com/license/\n */'
  12. },
  13. qunit: {
  14. files: ['test/index.html']
  15. },
  16. lint: {
  17. files: [
  18. 'grunt.js',
  19. 'modernizr.js',
  20. 'feature-detects/*.js'
  21. ]
  22. },
  23. min: {
  24. dist: {
  25. src: [
  26. '<banner:meta.banner>',
  27. 'modernizr.js'
  28. ],
  29. dest: 'modernizr.min.js'
  30. }
  31. },
  32. watch: {
  33. files: '<config:lint.files>',
  34. tasks: 'lint'
  35. },
  36. jshint: {
  37. options: {
  38. boss: true,
  39. browser: true,
  40. curly: false,
  41. devel: true,
  42. eqeqeq: false,
  43. eqnull: true,
  44. expr: true,
  45. evil: true,
  46. immed: false,
  47. laxcomma: true,
  48. newcap: false,
  49. noarg: true,
  50. smarttabs: true,
  51. sub: true,
  52. undef: true
  53. },
  54. globals: {
  55. Modernizr: true,
  56. DocumentTouch: true,
  57. TEST: true,
  58. SVGFEColorMatrixElement : true,
  59. Blob: true
  60. }
  61. }
  62. });
  63. grunt.registerTask('default', 'min');
  64. // Travis CI task.
  65. grunt.registerTask('travis', 'qunit');
  66. };