2017-01-29 23:51:08 +00:00
|
|
|
module.exports = function exports(grunt) {
|
|
|
|
'use strict';
|
2016-05-27 21:59:01 +00:00
|
|
|
|
2015-03-29 12:43:02 +00:00
|
|
|
grunt.config.merge({
|
2017-01-29 23:51:08 +00:00
|
|
|
nodedir: 'node_modules',
|
2015-03-29 12:43:02 +00:00
|
|
|
copy: {
|
|
|
|
html: {
|
2017-01-29 23:51:08 +00:00
|
|
|
src: ['*.html'],
|
2015-03-29 12:43:02 +00:00
|
|
|
expand: true,
|
2017-01-29 23:51:08 +00:00
|
|
|
cwd: 'html/',
|
|
|
|
dest: 'build/'
|
2015-03-29 12:43:02 +00:00
|
|
|
},
|
|
|
|
vendorjs: {
|
2017-01-29 23:51:08 +00:00
|
|
|
src: ['promise-polyfill/promise.js'],
|
2015-03-29 12:43:02 +00:00
|
|
|
expand: true,
|
2017-01-29 23:51:08 +00:00
|
|
|
cwd: '<%=nodedir%>/',
|
|
|
|
dest: 'build/vendor/'
|
2015-03-29 12:43:02 +00:00
|
|
|
},
|
2016-06-01 20:20:14 +00:00
|
|
|
config: {
|
2017-01-29 23:51:08 +00:00
|
|
|
src: ['config.json'],
|
2016-06-01 20:20:14 +00:00
|
|
|
expand: true,
|
2017-01-29 23:51:08 +00:00
|
|
|
cwd: '.',
|
|
|
|
dest: 'build/'
|
2016-06-01 20:20:14 +00:00
|
|
|
},
|
2016-06-19 22:38:47 +00:00
|
|
|
ionicons: {
|
2017-01-29 23:51:08 +00:00
|
|
|
src: ['fonts/*'],
|
2015-04-04 16:01:57 +00:00
|
|
|
expand: true,
|
2017-01-29 23:51:08 +00:00
|
|
|
dest: 'build/',
|
|
|
|
cwd: 'assets/icons/'
|
2015-04-04 16:01:57 +00:00
|
|
|
},
|
2016-06-19 22:38:47 +00:00
|
|
|
assistantFont: {
|
2017-01-29 23:51:08 +00:00
|
|
|
src: ['fonts/*'],
|
2015-03-29 12:43:02 +00:00
|
|
|
expand: true,
|
2017-01-29 23:51:08 +00:00
|
|
|
dest: 'build/',
|
|
|
|
cwd: 'assets/'
|
2017-01-28 14:33:13 +00:00
|
|
|
},
|
|
|
|
locale: {
|
|
|
|
src: ['locale/*'],
|
|
|
|
expand: true,
|
|
|
|
dest: 'build/',
|
|
|
|
cwd: '.'
|
2015-03-29 12:43:02 +00:00
|
|
|
}
|
|
|
|
},
|
2015-03-31 13:38:21 +00:00
|
|
|
sass: {
|
2017-01-31 03:45:27 +00:00
|
|
|
files: [{
|
|
|
|
expand: true,
|
|
|
|
cwd: 'scss/',
|
|
|
|
src: '*.scss',
|
|
|
|
dest: 'build/',
|
|
|
|
ext: '.css'
|
|
|
|
}],
|
2016-06-02 22:49:45 +00:00
|
|
|
dev: {
|
2016-06-16 18:35:09 +00:00
|
|
|
options: {
|
|
|
|
sourceMap: true,
|
2017-01-29 23:51:08 +00:00
|
|
|
outputStyle: 'expanded'
|
2016-06-16 18:35:09 +00:00
|
|
|
},
|
2017-01-31 03:45:27 +00:00
|
|
|
files: [{
|
|
|
|
expand: true,
|
|
|
|
cwd: 'scss/',
|
|
|
|
src: '*.scss',
|
|
|
|
dest: 'build/',
|
|
|
|
ext: '.css'
|
|
|
|
}]
|
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: {
|
2017-01-29 23:51:08 +00:00
|
|
|
outputStyle: 'compressed'
|
2016-06-02 22:49:45 +00:00
|
|
|
},
|
2017-01-31 03:45:27 +00:00
|
|
|
files: [{
|
|
|
|
expand: true,
|
|
|
|
cwd: 'scss/',
|
|
|
|
src: '*.scss',
|
|
|
|
dest: 'build/',
|
|
|
|
ext: '.css'
|
|
|
|
}]
|
2015-03-31 13:38:21 +00:00
|
|
|
}
|
|
|
|
},
|
2016-05-19 15:47:13 +00:00
|
|
|
postcss: {
|
|
|
|
options: {
|
2016-07-23 12:52:19 +00:00
|
|
|
map: false,
|
2016-05-19 15:47:13 +00:00
|
|
|
processors: [
|
2017-01-29 23:51:08 +00:00
|
|
|
require('autoprefixer')({
|
|
|
|
browsers: ['> 1% in DE']
|
2016-05-19 15:47:13 +00:00
|
|
|
})
|
|
|
|
]
|
|
|
|
},
|
|
|
|
dist: {
|
2017-01-29 23:51:08 +00:00
|
|
|
src: 'build/*.css'
|
2016-05-19 15:47:13 +00:00
|
|
|
}
|
|
|
|
},
|
2016-05-22 20:13:46 +00:00
|
|
|
inline: {
|
2017-01-30 07:37:31 +00:00
|
|
|
dev: {
|
|
|
|
options: {
|
|
|
|
cssmin: true,
|
|
|
|
uglify: true
|
|
|
|
},
|
|
|
|
src: 'build/index.html',
|
|
|
|
dest: 'build/index.html'
|
|
|
|
},
|
2016-05-22 20:13:46 +00:00
|
|
|
dist: {
|
|
|
|
options: {
|
2017-01-30 07:37:31 +00:00
|
|
|
tag: '__build',
|
2016-05-22 20:13:46 +00:00
|
|
|
cssmin: true,
|
|
|
|
uglify: true
|
|
|
|
},
|
2017-01-29 23:51:08 +00:00
|
|
|
src: 'build/index.html',
|
|
|
|
dest: 'build/index.html'
|
2016-05-22 20:13:46 +00:00
|
|
|
}
|
|
|
|
},
|
2016-06-16 18:35:09 +00:00
|
|
|
htmlmin: {
|
|
|
|
dist: {
|
|
|
|
options: {
|
|
|
|
removeComments: true,
|
|
|
|
collapseWhitespace: true,
|
|
|
|
minifyJS: true
|
|
|
|
},
|
|
|
|
files: {
|
|
|
|
'build/index.html': 'build/index.html'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
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: {
|
2017-01-29 23:51:08 +00:00
|
|
|
baseUrl: 'lib',
|
|
|
|
name: '../<%=nodedir%>/almond/almond',
|
|
|
|
mainConfigFile: 'app.js',
|
|
|
|
include: '../app',
|
|
|
|
out: 'build/app.js',
|
2016-05-23 07:30:19 +00:00
|
|
|
build: true
|
2016-05-22 22:13:21 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
dev: {
|
|
|
|
options: {
|
2017-01-29 23:51:08 +00:00
|
|
|
baseUrl: 'lib',
|
|
|
|
name: '../<%=nodedir%>/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
|
|
|
},
|
2017-01-28 14:33:13 +00:00
|
|
|
'json-minify': {
|
|
|
|
build: {
|
|
|
|
files: 'build/locale/*.json'
|
|
|
|
}
|
|
|
|
},
|
2016-05-29 16:22:06 +00:00
|
|
|
cachebreaker: {
|
|
|
|
default: {
|
|
|
|
options: {
|
2017-01-29 23:51:08 +00:00
|
|
|
match: ['app.js']
|
2016-05-29 16:22:06 +00:00
|
|
|
},
|
|
|
|
files: {
|
2017-01-29 23:51:08 +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
|
|
|
|
2017-01-29 23:51:08 +00:00
|
|
|
grunt.loadNpmTasks('grunt-contrib-copy');
|
|
|
|
grunt.loadNpmTasks('grunt-contrib-requirejs');
|
|
|
|
grunt.loadNpmTasks('grunt-sass');
|
|
|
|
grunt.loadNpmTasks('grunt-postcss');
|
|
|
|
grunt.loadNpmTasks('grunt-inline');
|
2016-06-16 18:35:09 +00:00
|
|
|
grunt.loadNpmTasks('grunt-contrib-htmlmin');
|
2017-01-28 14:33:13 +00:00
|
|
|
grunt.loadNpmTasks('grunt-json-minify');
|
2017-01-29 23:51:08 +00:00
|
|
|
grunt.loadNpmTasks('grunt-cache-breaker');
|
2016-05-22 11:23:43 +00:00
|
|
|
};
|