hopglass/tasks/build.js

117 lines
2.7 KiB
JavaScript
Raw Normal View History

2015-03-29 14:43:02 +02:00
module.exports = function(grunt) {
grunt.config.merge({
bowerdir: "bower_components",
2015-03-29 14:43:02 +02:00
copy: {
html: {
options: {
process: function (content) {
return content.replace("#revision#", grunt.option("gitRevision"))
}
},
2015-03-29 14:43:02 +02:00
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: {
src: [ "es6-shim/es6-shim.min.js" ],
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: {
2015-03-29 14:43:02 +02:00
src: [ "fonts/*",
"roboto-slab-fontface.css"
],
expand: true,
dest: "build/",
cwd: "bower_components/roboto-slab-fontface"
},
2015-04-04 18:01:57 +02:00
roboto: {
src: [ "fonts/*",
"roboto-fontface.css"
],
expand: true,
dest: "build/",
cwd: "bower_components/roboto-fontface"
},
2015-03-29 14:43:02 +02:00
ionicons: {
src: [ "fonts/*",
"css/ionicons.min.css"
],
expand: true,
dest: "build/",
2015-03-29 16:14:10 +02:00
cwd: "bower_components/ionicons/"
2015-04-15 22:25:22 +02:00
},
leafletImages: {
src: [ "images/*" ],
expand: true,
dest: "build/",
cwd: "bower_components/leaflet/dist/"
},
c3: {
src: ["c3.min.css"],
expand: true,
dest: "build/",
cwd: "bower_components/c3/"
2015-03-29 14:43:02 +02:00
}
},
2015-03-31 15:38:21 +02:00
sass: {
dist: {
options: {
style: "compressed"
},
files: {
"build/style.css": "scss/main.scss"
}
}
},
2015-03-29 14:43:02 +02:00
cssmin: {
target: {
files: {
"build/style.css": [ "bower_components/leaflet/dist/leaflet.css",
"bower_components/Leaflet.label/dist/leaflet.label.css",
"style.css"
]
}
}
},
"bower-install-simple": {
options: {
directory: "<%=bowerdir%>",
color: true,
interactive: false,
production: true
},
"prod": {
options: {
production: true
}
}
},
2015-03-29 14:43:02 +02:00
requirejs: {
compile: {
options: {
baseUrl: "lib",
name: "../bower_components/almond/almond",
mainConfigFile: "app.js",
include: "../app",
wrap: true,
optimize: "uglify",
out: "build/app.js"
}
}
}
})
grunt.loadNpmTasks("grunt-bower-install-simple")
2015-03-29 14:43:02 +02:00
grunt.loadNpmTasks("grunt-contrib-copy")
grunt.loadNpmTasks("grunt-contrib-requirejs")
2015-03-31 15:38:21 +02:00
grunt.loadNpmTasks("grunt-contrib-sass")
2015-03-29 14:43:02 +02:00
}