2015-03-29 12:43:02 +00:00
|
|
|
module.exports = function(grunt) {
|
|
|
|
grunt.config.merge({
|
2015-08-06 16:33:20 +00:00
|
|
|
bowerdir: "bower_components",
|
2015-03-29 12:43:02 +00:00
|
|
|
copy: {
|
|
|
|
html: {
|
2015-04-19 10:55:14 +00:00
|
|
|
options: {
|
|
|
|
process: function (content) {
|
|
|
|
return content.replace("#revision#", grunt.option("gitRevision"))
|
|
|
|
}
|
|
|
|
},
|
2015-03-29 12:43:02 +00:00
|
|
|
src: ["*.html"],
|
|
|
|
expand: true,
|
|
|
|
cwd: "html/",
|
|
|
|
dest: "build/"
|
|
|
|
},
|
2015-03-31 15:22:36 +00:00
|
|
|
img: {
|
|
|
|
src: ["img/*"],
|
|
|
|
expand: true,
|
|
|
|
dest: "build/"
|
|
|
|
},
|
2015-03-29 12:43:02 +00:00
|
|
|
vendorjs: {
|
2015-04-02 00:33:17 +00:00
|
|
|
src: [ "es6-shim/es6-shim.min.js" ],
|
2015-03-29 12:43:02 +00:00
|
|
|
expand: true,
|
|
|
|
cwd: "bower_components/",
|
|
|
|
dest: "build/vendor/"
|
|
|
|
},
|
2015-04-04 16:01:57 +00:00
|
|
|
robotoSlab: {
|
2015-03-29 12:43:02 +00:00
|
|
|
src: [ "fonts/*",
|
|
|
|
"roboto-slab-fontface.css"
|
|
|
|
],
|
|
|
|
expand: true,
|
|
|
|
dest: "build/",
|
|
|
|
cwd: "bower_components/roboto-slab-fontface"
|
|
|
|
},
|
2015-04-04 16:01:57 +00:00
|
|
|
roboto: {
|
|
|
|
src: [ "fonts/*",
|
|
|
|
"roboto-fontface.css"
|
|
|
|
],
|
|
|
|
expand: true,
|
|
|
|
dest: "build/",
|
|
|
|
cwd: "bower_components/roboto-fontface"
|
|
|
|
},
|
2015-03-29 12:43:02 +00:00
|
|
|
ionicons: {
|
|
|
|
src: [ "fonts/*",
|
|
|
|
"css/ionicons.min.css"
|
|
|
|
],
|
|
|
|
expand: true,
|
|
|
|
dest: "build/",
|
2015-03-29 14:14:10 +00:00
|
|
|
cwd: "bower_components/ionicons/"
|
2015-04-15 20:25:22 +00:00
|
|
|
},
|
|
|
|
leafletImages: {
|
|
|
|
src: [ "images/*" ],
|
|
|
|
expand: true,
|
|
|
|
dest: "build/",
|
|
|
|
cwd: "bower_components/leaflet/dist/"
|
2015-03-29 12:43:02 +00:00
|
|
|
}
|
|
|
|
},
|
2015-03-31 13:38:21 +00:00
|
|
|
sass: {
|
2016-05-19 15:47:13 +00:00
|
|
|
options: {
|
|
|
|
sourceMap: true,
|
|
|
|
outputStyle: "compressed"
|
|
|
|
},
|
2015-03-31 13:38:21 +00:00
|
|
|
dist: {
|
|
|
|
files: {
|
|
|
|
"build/style.css": "scss/main.scss"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2016-05-19 15:47:13 +00:00
|
|
|
postcss: {
|
|
|
|
options: {
|
|
|
|
map: true,
|
|
|
|
processors: [
|
|
|
|
require("autoprefixer")({
|
|
|
|
browsers: ["last 2 versions"]
|
|
|
|
})
|
|
|
|
]
|
|
|
|
},
|
|
|
|
dist: {
|
|
|
|
src: "build/style.css"
|
|
|
|
}
|
|
|
|
},
|
2015-03-29 12:43:02 +00:00
|
|
|
cssmin: {
|
|
|
|
target: {
|
|
|
|
files: {
|
|
|
|
"build/style.css": [ "bower_components/leaflet/dist/leaflet.css",
|
|
|
|
"bower_components/Leaflet.label/dist/leaflet.label.css",
|
|
|
|
"style.css"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2015-08-06 16:33:20 +00:00
|
|
|
"bower-install-simple": {
|
|
|
|
options: {
|
|
|
|
directory: "<%=bowerdir%>",
|
|
|
|
color: true,
|
|
|
|
interactive: false,
|
|
|
|
production: true
|
|
|
|
},
|
|
|
|
"prod": {
|
|
|
|
options: {
|
|
|
|
production: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2015-03-29 12:43:02 +00:00
|
|
|
requirejs: {
|
|
|
|
compile: {
|
|
|
|
options: {
|
|
|
|
baseUrl: "lib",
|
|
|
|
name: "../bower_components/almond/almond",
|
|
|
|
mainConfigFile: "app.js",
|
|
|
|
include: "../app",
|
|
|
|
wrap: true,
|
|
|
|
optimize: "uglify",
|
|
|
|
out: "build/app.js"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
2015-08-06 16:33:20 +00:00
|
|
|
grunt.loadNpmTasks("grunt-bower-install-simple")
|
2015-03-29 12:43:02 +00:00
|
|
|
grunt.loadNpmTasks("grunt-contrib-copy")
|
|
|
|
grunt.loadNpmTasks("grunt-contrib-requirejs")
|
2016-05-19 15:47:13 +00:00
|
|
|
grunt.loadNpmTasks("grunt-sass")
|
|
|
|
grunt.loadNpmTasks("grunt-postcss")
|
2015-03-29 12:43:02 +00:00
|
|
|
}
|