Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.58 KB | None | 0 0
  1. module.exports = function(grunt){
  2. grunt.initConfig({
  3. concat: {
  4. options: {
  5. separator : ";",
  6. stripBanner : false
  7. },
  8. common : {
  9. src : [
  10. 'node_modules/jquery/dist/jquery.min.js',
  11. 'node_modules/bootstrap/dist/js/bootstrap.min.js',
  12. 'node_modules/chart.js/dist/Chart.min.js',
  13. ],
  14. dest : "./tmp/common.js"
  15. },
  16. CSS : {
  17. options: {
  18. separator : ";",
  19. stripBanner : false
  20. },
  21. src: [
  22. 'node_modules/font-awesome/css/font-awesome.min.css',
  23. 'node_modules/bootstrap/dist/css/bootstrap.min.css',
  24.  
  25. ],
  26. dest : './public/css/bundle.css'
  27. },
  28. app : {
  29. src : [ './assets/js/*.js '],
  30. dest: "./public/javascripts/script.js"
  31. }
  32. },
  33. uglify: {
  34. common : {
  35. src: './tmp/common.js',
  36. dest: './public/javascripts/common.min.js'
  37. }
  38. },
  39. copy : {
  40. fontAwesomeFonts : {
  41. expand: true,
  42. dot: true,
  43. flatten: true,
  44. cwd: 'node_modules/font-awesome/fonts',
  45. src: ['**/*'],
  46. dest : './public/fonts'
  47. }
  48. },
  49. watch : {
  50. dev : {
  51. options: {
  52. atBegin: true
  53. },
  54. files : [ './assets/js/*.js'],
  55. tasks : [ 'concat:app']
  56. }
  57. }
  58. })
  59.  
  60. grunt.loadNpmTasks('grunt-contrib-concat');
  61. grunt.loadNpmTasks('grunt-contrib-uglify');
  62. grunt.loadNpmTasks('grunt-contrib-watch');
  63. grunt.loadNpmTasks('grunt-contrib-copy');
  64.  
  65. grunt.registerTask('default', ['concat', 'uglify:common', 'copy', 'watch:dev']);
  66. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement