4
0

build.js 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. module.exports = function(grunt) {
  2. grunt.config.merge({
  3. copy: {
  4. html: {
  5. src: ["*.html"],
  6. expand: true,
  7. cwd: "html/",
  8. dest: "build/"
  9. },
  10. img: {
  11. src: ["img/*"],
  12. expand: true,
  13. dest: "build/"
  14. },
  15. vendorjs: {
  16. src: [ "es6-shim/es6-shim.min.js" ],
  17. expand: true,
  18. cwd: "bower_components/",
  19. dest: "build/vendor/"
  20. },
  21. robotoSlab: {
  22. src: [ "fonts/*",
  23. "roboto-slab-fontface.css"
  24. ],
  25. expand: true,
  26. dest: "build/",
  27. cwd: "bower_components/roboto-slab-fontface"
  28. },
  29. roboto: {
  30. src: [ "fonts/*",
  31. "roboto-fontface.css"
  32. ],
  33. expand: true,
  34. dest: "build/",
  35. cwd: "bower_components/roboto-fontface"
  36. },
  37. ionicons: {
  38. src: [ "fonts/*",
  39. "css/ionicons.min.css"
  40. ],
  41. expand: true,
  42. dest: "build/",
  43. cwd: "bower_components/ionicons/"
  44. }
  45. },
  46. sass: {
  47. dist: {
  48. options: {
  49. style: "compressed"
  50. },
  51. files: {
  52. "build/style.css": "scss/main.scss"
  53. }
  54. }
  55. },
  56. cssmin: {
  57. target: {
  58. files: {
  59. "build/style.css": [ "bower_components/leaflet/dist/leaflet.css",
  60. "bower_components/Leaflet.label/dist/leaflet.label.css",
  61. "style.css"
  62. ]
  63. }
  64. }
  65. },
  66. requirejs: {
  67. compile: {
  68. options: {
  69. baseUrl: "lib",
  70. name: "../bower_components/almond/almond",
  71. mainConfigFile: "app.js",
  72. include: "../app",
  73. wrap: true,
  74. optimize: "uglify",
  75. out: "build/app.js"
  76. }
  77. }
  78. }
  79. })
  80. grunt.loadNpmTasks("grunt-contrib-copy")
  81. grunt.loadNpmTasks("grunt-contrib-requirejs")
  82. grunt.loadNpmTasks("grunt-contrib-sass")
  83. }