Gruntfile.js 963 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. }
  22. },
  23. all: ['src/**/*.js']
  24. },
  25. uglify: {
  26. options: {
  27. banner: '/*! skrollr-menu <%= pkg.version %> (<%= grunt.template.today("yyyy-mm-dd") %>) | Alexander Prinzhorn - https://github.com/Prinzhorn/skrollr-menu | Free to use under terms of MIT license */\n'
  28. },
  29. all: {
  30. files: {
  31. 'dist/skrollr.menu.min.js': 'src/skrollr.menu.js',
  32. }
  33. }
  34. }
  35. });
  36. //Dependencies.
  37. grunt.loadNpmTasks('grunt-contrib-jshint');
  38. grunt.loadNpmTasks('grunt-contrib-uglify');
  39. //Tasks.
  40. grunt.registerTask('default', ['jshint', 'uglify']);
  41. };