Gruntfile.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. module.exports = function(grunt) {
  2. grunt.initConfig({
  3. pkg: grunt.file.readJSON('package.json'),
  4. banner:
  5. '/*!\n'+
  6. ' * Bootstrap Confirmation <%= pkg.version %>\n'+
  7. ' * Copyright 2013 Nimit Suwannagate <ethaizone@hotmail.com>\n'+
  8. ' * Copyright <%= grunt.template.today("yyyy") %> Damien "Mistic" Sorel <http://www.strangeplanet.fr>\n'+
  9. ' * Licensed under the Apache License, Version 2.0 (the "License")\n'+
  10. ' */',
  11. // compress js
  12. uglify: {
  13. options: {
  14. banner: '<%= banner %>\n'
  15. },
  16. dist: {
  17. files: {
  18. 'bootstrap-confirmation.min.js': [
  19. 'bootstrap-confirmation.js'
  20. ]
  21. }
  22. }
  23. },
  24. // jshint tests
  25. jshint: {
  26. lib: {
  27. files: {
  28. src: [
  29. 'bootstrap-confirmation.js'
  30. ]
  31. }
  32. }
  33. }
  34. });
  35. grunt.loadNpmTasks('grunt-contrib-uglify');
  36. grunt.loadNpmTasks('grunt-contrib-jshint');
  37. grunt.registerTask('default', [
  38. 'uglify'
  39. ]);
  40. grunt.registerTask('test', [
  41. 'jshint'
  42. ]);
  43. };