grunt.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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.2',
  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. }
  59. },
  60. watch: {
  61. files: [ 'grunt.js', '<%= inputJS %>', '<%= inputCSS %>' ],
  62. tasks: 'default'
  63. }
  64. });
  65. // Dependencies
  66. grunt.loadNpmTasks( 'grunt-contrib-mincss' );
  67. // Default task
  68. grunt.registerTask( 'default', [ 'lint', 'mincss', 'min' ] );
  69. };