gruntfile.js 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. module.exports = function(grunt) {
  2. grunt.initConfig({
  3. pkg: grunt.file.readJSON('package.json'),
  4. cssmin: {
  5. combine: {
  6. files: {
  7. 'style.min.css': ['style.css', 'css/boot.css', 'css/fullcalendar.css', 'css/animate.css', 'css/fonts.css'],
  8. 'css/front.min.css': ['css/front-page.css']
  9. }
  10. }
  11. },
  12. concat: {
  13. options: {
  14. separator: ';',
  15. },
  16. dist: {
  17. src: ['js/jquery-2.1.4.min.js', 'js/modernizr.js', 'js/bootstrap-3.3.5.min.js', 'js/jasny-bootstrap-3.1.3.min.js', 'js/moment.min.js', 'js/fullcalendar.min.js', 'js/validate.min.js', 'js/scripts.js'],
  18. dest: 'js/script.js',
  19. },
  20. disto: {
  21. src: ['js/jquery-2.1.4.min.js', 'js/modernizr.js', 'js/bootstrap-3.3.5.min.js', 'js/jasny-bootstrap-3.1.3.min.js'],
  22. dest: 'js/script-o.js',
  23. },
  24. disto: {
  25. src: ['js/jquery-2.1.4.min.js', 'js/svg-morpheus.js', 'js/messenger.min.js', 'js/bootstrap.js', 'js/terminal.js', 'js/front-page.js'],
  26. dest: 'js/front-page.min.js',
  27. }
  28. },
  29. jshint: {
  30. options: {
  31. jshintrc: 'js/.jshintrc'
  32. },
  33. all: ['js/init.js']
  34. },
  35. uglify: {
  36. my_target: {
  37. files: {
  38. 'js/script.min.js': ['js/script.js'],
  39. 'js/script-o.min.js': ['js/script-o.js'],
  40. 'js/init.min.js': ['js/init.js'],
  41. 'js/init-o.min.js': ['js/init-o.js'],
  42. 'js/front.min.js' : ['js/front-page.min.js'],
  43. 'js/chat.min.js' : ['js/chat.js'],
  44. }
  45. }
  46. }
  47. });
  48. grunt.loadNpmTasks('grunt-contrib-cssmin');
  49. grunt.loadNpmTasks('grunt-contrib-concat');
  50. grunt.loadNpmTasks('grunt-contrib-jshint');
  51. grunt.loadNpmTasks('grunt-contrib-uglify');
  52. grunt.registerTask('js', [ 'jshint' ]);
  53. grunt.registerTask('css', [ 'cssmin' ]);
  54. grunt.registerTask('default', [ 'cssmin', 'concat', 'uglify' ]);
  55. };