build.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. vendorjs: {
  11. src: [ "es6-shim/es6-shim.min.js",
  12. "intl/Intl.complete.js"
  13. ],
  14. expand: true,
  15. cwd: "bower_components/",
  16. dest: "build/vendor/"
  17. },
  18. roboto: {
  19. src: [ "fonts/*",
  20. "roboto-slab-fontface.css"
  21. ],
  22. expand: true,
  23. dest: "build/",
  24. cwd: "bower_components/roboto-slab-fontface"
  25. },
  26. ionicons: {
  27. src: [ "fonts/*",
  28. "css/ionicons.min.css"
  29. ],
  30. expand: true,
  31. dest: "build/",
  32. cwd: "bower_components/ionicons/"
  33. }
  34. },
  35. cssmin: {
  36. target: {
  37. files: {
  38. "build/style.css": [ "bower_components/leaflet/dist/leaflet.css",
  39. "bower_components/Leaflet.label/dist/leaflet.label.css",
  40. "style.css"
  41. ]
  42. }
  43. }
  44. },
  45. requirejs: {
  46. compile: {
  47. options: {
  48. baseUrl: "lib",
  49. name: "../bower_components/almond/almond",
  50. mainConfigFile: "app.js",
  51. include: "../app",
  52. wrap: true,
  53. optimize: "uglify",
  54. out: "build/app.js"
  55. }
  56. }
  57. }
  58. })
  59. grunt.loadNpmTasks("grunt-contrib-copy")
  60. grunt.loadNpmTasks("grunt-contrib-requirejs")
  61. grunt.loadNpmTasks("grunt-contrib-cssmin")
  62. }