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