Gruntfile.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. module.exports = function(grunt) {
  2. //Configuration.
  3. grunt.initConfig({
  4. pkg: grunt.file.readJSON('package.json') ,
  5. jshint: {
  6. options: {
  7. smarttabs: false,
  8. curly: true,
  9. immed: true,
  10. latedef: true,
  11. noarg: true,
  12. quotmark: 'single',
  13. undef: true,
  14. unused: true,
  15. strict: true,
  16. trailing: true,
  17. globals: {
  18. window: true,
  19. document: true,
  20. navigator: true,
  21. define: true,
  22. module: true
  23. }
  24. },
  25. all: ['src/**/*.js']
  26. },
  27. qunit: {
  28. all: ['test/index.html', 'test/loading.html']
  29. },
  30. uglify: {
  31. options: {
  32. banner: '/*! skrollr <%= pkg.version %> (<%= grunt.template.today("yyyy-mm-dd") %>) | Alexander Prinzhorn - https://github.com/Prinzhorn/skrollr | Free to use under terms of MIT license */\n'
  33. },
  34. all: {
  35. files: {
  36. 'dist/skrollr.min.js': 'src/skrollr.js'
  37. }
  38. }
  39. }
  40. });
  41. //Dependencies.
  42. grunt.loadNpmTasks('grunt-contrib-jshint');
  43. grunt.loadNpmTasks('grunt-contrib-qunit');
  44. grunt.loadNpmTasks('grunt-contrib-uglify');
  45. //Tasks.
  46. grunt.registerTask('default', ['jshint', 'qunit', 'uglify']);
  47. grunt.registerTask('travis', ['jshint', 'qunit']);
  48. };