Gruntfile.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. module.exports = function(grunt) {
  2. grunt.initConfig({
  3. pkg: grunt.file.readJSON('package.json'),
  4. qunit: {
  5. all: ['test/index.html', 'test/loaders.html']
  6. },
  7. jshint: {
  8. options: {
  9. sub: true,
  10. strict: true,
  11. newcap: false,
  12. globals: {
  13. jQuery: true
  14. }
  15. },
  16. with_overrides: {
  17. options: {
  18. strict: false
  19. },
  20. files: {
  21. src: ['i18n/*.js', 'test/tests.js']
  22. }
  23. },
  24. all: ['spectrum.js']
  25. },
  26. uglify: {
  27. options: {
  28. },
  29. dist: {
  30. files: {
  31. 'build/spectrum-min.js': ['spectrum.js']
  32. }
  33. }
  34. }
  35. });
  36. grunt.loadNpmTasks('grunt-contrib-jshint');
  37. grunt.loadNpmTasks('grunt-contrib-qunit');
  38. grunt.loadNpmTasks('grunt-contrib-uglify');
  39. // Testing tasks
  40. grunt.registerTask('test', ['jshint', 'qunit']);
  41. // Travis CI task.
  42. grunt.registerTask('travis', 'test');
  43. // Default task.
  44. grunt.registerTask('default', ['test']);
  45. //Build Task.
  46. grunt.registerTask('build', ['test', 'uglify']);
  47. };