build.js 1.5 KB

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