2016-05-22 12:51:30 +00:00
|
|
|
module.exports = function (grunt) {
|
2016-05-27 21:59:01 +00:00
|
|
|
"use strict";
|
|
|
|
|
2015-03-29 12:43:02 +00:00
|
|
|
grunt.config.merge({
|
2015-08-06 16:33:20 +00:00
|
|
|
bowerdir: "bower_components",
|
2015-03-29 12:43:02 +00:00
|
|
|
copy: {
|
|
|
|
html: {
|
|
|
|
src: ["*.html"],
|
|
|
|
expand: true,
|
|
|
|
cwd: "html/",
|
|
|
|
dest: "build/"
|
|
|
|
},
|
|
|
|
vendorjs: {
|
2016-05-22 14:22:24 +00:00
|
|
|
src: ["es6-shim/es6-shim.min.js",
|
|
|
|
"es6-shim/es6-shim.map"],
|
2015-03-29 12:43:02 +00:00
|
|
|
expand: true,
|
|
|
|
cwd: "bower_components/",
|
|
|
|
dest: "build/vendor/"
|
|
|
|
},
|
2016-06-01 20:20:14 +00:00
|
|
|
config: {
|
|
|
|
src: ["config.json"],
|
|
|
|
expand: true,
|
|
|
|
cwd: ".",
|
|
|
|
dest: "build/"
|
|
|
|
},
|
2015-04-04 16:01:57 +00:00
|
|
|
robotoSlab: {
|
2016-06-02 22:28:59 +00:00
|
|
|
src: ["**/*-Regular.*",
|
|
|
|
"**/*-Bold.*"
|
2016-05-22 12:51:30 +00:00
|
|
|
],
|
2015-03-29 12:43:02 +00:00
|
|
|
expand: true,
|
2016-06-02 22:28:59 +00:00
|
|
|
dest: "build/fonts/",
|
2016-06-03 17:38:58 +00:00
|
|
|
filter: "isFile",
|
2016-06-02 22:28:59 +00:00
|
|
|
flatten: true,
|
|
|
|
cwd: "bower_components/roboto-slab-fontface-kit/fonts"
|
2015-03-29 12:43:02 +00:00
|
|
|
},
|
2015-04-04 16:01:57 +00:00
|
|
|
roboto: {
|
2016-06-02 22:28:59 +00:00
|
|
|
src: ["fonts/*-Regular.*"
|
2016-05-22 12:51:30 +00:00
|
|
|
],
|
2015-04-04 16:01:57 +00:00
|
|
|
expand: true,
|
|
|
|
dest: "build/",
|
|
|
|
cwd: "bower_components/roboto-fontface"
|
|
|
|
},
|
2015-03-29 12:43:02 +00:00
|
|
|
ionicons: {
|
2016-05-26 23:34:42 +00:00
|
|
|
src: ["fonts/*"],
|
2015-03-29 12:43:02 +00:00
|
|
|
expand: true,
|
|
|
|
dest: "build/",
|
2016-05-22 13:26:16 +00:00
|
|
|
cwd: "assets/icons/"
|
2015-03-29 12:43:02 +00:00
|
|
|
}
|
|
|
|
},
|
2015-03-31 13:38:21 +00:00
|
|
|
sass: {
|
2016-06-02 22:49:45 +00:00
|
|
|
dev: {
|
2016-05-19 15:47:13 +00:00
|
|
|
options: {
|
|
|
|
sourceMap: true,
|
2016-06-02 22:49:45 +00:00
|
|
|
outputStyle: "expanded"
|
|
|
|
},
|
|
|
|
files: {
|
|
|
|
"build/style.css": "scss/main.scss"
|
|
|
|
}
|
2016-05-19 15:47:13 +00:00
|
|
|
},
|
2015-03-31 13:38:21 +00:00
|
|
|
dist: {
|
2016-06-02 22:49:45 +00:00
|
|
|
options: {
|
|
|
|
outputStyle: "compressed"
|
|
|
|
},
|
2015-03-31 13:38:21 +00:00
|
|
|
files: {
|
|
|
|
"build/style.css": "scss/main.scss"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2016-05-19 15:47:13 +00:00
|
|
|
postcss: {
|
|
|
|
options: {
|
|
|
|
map: true,
|
|
|
|
processors: [
|
|
|
|
require("autoprefixer")({
|
2016-06-03 17:38:58 +00:00
|
|
|
browsers: ["> 1% in DE"]
|
2016-05-19 15:47:13 +00:00
|
|
|
})
|
|
|
|
]
|
|
|
|
},
|
|
|
|
dist: {
|
|
|
|
src: "build/style.css"
|
|
|
|
}
|
|
|
|
},
|
2016-05-22 20:13:46 +00:00
|
|
|
inline: {
|
|
|
|
dist: {
|
|
|
|
options: {
|
|
|
|
cssmin: true,
|
|
|
|
uglify: true
|
|
|
|
},
|
|
|
|
src: "build/index.html",
|
|
|
|
dest: "build/index.html"
|
|
|
|
}
|
|
|
|
},
|
2016-06-01 20:20:14 +00:00
|
|
|
inlinedata: {
|
|
|
|
injs: {
|
|
|
|
expand: true,
|
2016-06-03 17:38:58 +00:00
|
|
|
cwd: ".",
|
|
|
|
src: ["build/*.html"],
|
|
|
|
ext: ".html"
|
2016-06-01 20:20:14 +00:00
|
|
|
}
|
|
|
|
},
|
2015-08-06 16:33:20 +00:00
|
|
|
"bower-install-simple": {
|
2016-05-22 12:51:30 +00:00
|
|
|
options: {
|
|
|
|
directory: "<%=bowerdir%>",
|
|
|
|
color: true,
|
|
|
|
interactive: false,
|
|
|
|
production: true
|
|
|
|
},
|
|
|
|
"prod": {
|
2015-08-06 16:33:20 +00:00
|
|
|
options: {
|
|
|
|
production: true
|
|
|
|
}
|
2016-05-22 12:51:30 +00:00
|
|
|
}
|
|
|
|
},
|
2015-03-29 12:43:02 +00:00
|
|
|
requirejs: {
|
2016-05-22 22:13:21 +00:00
|
|
|
default: {
|
2015-03-29 12:43:02 +00:00
|
|
|
options: {
|
|
|
|
baseUrl: "lib",
|
|
|
|
name: "../bower_components/almond/almond",
|
|
|
|
mainConfigFile: "app.js",
|
|
|
|
include: "../app",
|
2016-05-22 22:13:21 +00:00
|
|
|
out: "build/app.js",
|
2016-05-23 07:30:19 +00:00
|
|
|
build: true
|
2016-05-22 22:13:21 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
dev: {
|
|
|
|
options: {
|
|
|
|
baseUrl: "lib",
|
|
|
|
name: "../bower_components/almond/almond",
|
|
|
|
mainConfigFile: "app.js",
|
|
|
|
include: "../app",
|
|
|
|
optimize: "none",
|
|
|
|
out: "build/app.js",
|
2016-06-02 22:49:45 +00:00
|
|
|
build: false,
|
|
|
|
generateSourceMaps: true
|
2015-03-29 12:43:02 +00:00
|
|
|
}
|
|
|
|
}
|
2016-05-29 16:22:06 +00:00
|
|
|
},
|
|
|
|
cachebreaker: {
|
|
|
|
default: {
|
|
|
|
options: {
|
2016-06-03 17:38:58 +00:00
|
|
|
match: ["app.js"]
|
2016-05-29 16:22:06 +00:00
|
|
|
},
|
|
|
|
files: {
|
2016-06-03 17:38:58 +00:00
|
|
|
src: ["build/index.html"]
|
2016-05-29 16:22:06 +00:00
|
|
|
}
|
|
|
|
}
|
2015-03-29 12:43:02 +00:00
|
|
|
}
|
2016-05-22 11:23:43 +00:00
|
|
|
});
|
2015-03-29 12:43:02 +00:00
|
|
|
|
2016-05-22 11:23:43 +00: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 20:13:46 +00:00
|
|
|
grunt.loadNpmTasks("grunt-inline");
|
2016-06-03 17:38:58 +00:00
|
|
|
grunt.loadNpmTasks("grunt-inline-data");
|
2016-05-29 16:22:06 +00:00
|
|
|
grunt.loadNpmTasks("grunt-cache-breaker");
|
2016-05-22 11:23:43 +00:00
|
|
|
};
|