grunt.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /* global module:false */
  2. module.exports = function(grunt) {
  3. // Project configuration
  4. grunt.initConfig({
  5. pkg: '<json:package.json>',
  6. inputJS: 'js/reveal.js',
  7. inputCSS: 'css/reveal.css',
  8. outputJS: 'js/reveal.min.js',
  9. outputCSS: 'css/reveal.min.css',
  10. meta: {
  11. version: '2.3',
  12. banner:
  13. '/*!\n' +
  14. ' * reveal.js <%= meta.version %> (<%= grunt.template.today("yyyy-mm-dd, HH:MM") %>)\n' +
  15. ' * http://lab.hakim.se/reveal-js\n' +
  16. ' * MIT licensed\n' +
  17. ' *\n' +
  18. ' * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se\n' +
  19. ' */'
  20. },
  21. lint: {
  22. files: [ 'grunt.js', '<%= inputJS %>' ]
  23. },
  24. // Tests will be added soon
  25. qunit: {
  26. files: [ 'test/**/*.html' ]
  27. },
  28. min: {
  29. dist: {
  30. src: [ '<banner:meta.banner>', '<%= inputJS %>' ],
  31. dest: '<%= outputJS %>'
  32. }
  33. },
  34. mincss: {
  35. compress: {
  36. files: {
  37. '<%= outputCSS %>': [ '<%= inputCSS %>' ]
  38. }
  39. }
  40. },
  41. jshint: {
  42. options: {
  43. curly: false,
  44. eqeqeq: true,
  45. immed: true,
  46. latedef: true,
  47. newcap: true,
  48. noarg: true,
  49. sub: true,
  50. undef: true,
  51. eqnull: true,
  52. browser: true,
  53. expr: true
  54. },
  55. globals: {
  56. head: false,
  57. module: false,
  58. console: false
  59. }
  60. },
  61. watch: {
  62. files: [ 'grunt.js', '<%= inputJS %>', '<%= inputCSS %>' ],
  63. tasks: 'default'
  64. }
  65. });
  66. // Dependencies
  67. grunt.loadNpmTasks( 'grunt-contrib-mincss' );
  68. // Default task
  69. grunt.registerTask( 'default', [ 'lint', 'mincss', 'min' ] );
  70. };