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
|
|
|
'browserSync': {
|
2016-05-29 14:38:57 +00:00
|
|
|
dev: {
|
|
|
|
bsFiles: {
|
|
|
|
src: [
|
2017-01-29 23:51:08 +00:00
|
|
|
'build/*.css',
|
|
|
|
'build/*.js',
|
|
|
|
'build/*.html'
|
2016-05-29 14:38:57 +00:00
|
|
|
]
|
|
|
|
},
|
2015-03-29 12:43:02 +00:00
|
|
|
options: {
|
2017-01-29 23:51:08 +00:00
|
|
|
open: 'local',
|
2016-05-29 14:38:57 +00:00
|
|
|
watchTask: true,
|
|
|
|
injectChanges: true,
|
|
|
|
server: {
|
2017-01-29 23:51:08 +00:00
|
|
|
baseDir: 'build',
|
|
|
|
index: 'index.html'
|
2016-05-29 14:38:57 +00:00
|
|
|
}
|
2015-03-29 12:43:02 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
watch: {
|
2016-05-29 14:38:57 +00:00
|
|
|
html: {
|
2017-01-28 14:33:13 +00:00
|
|
|
files: ['html/index.html', 'config.json', 'locale/*.json'],
|
2017-01-30 07:37:31 +00:00
|
|
|
tasks: ['copy', 'inline:dev', 'htmlmin', 'json-minify']
|
2015-03-29 12:43:02 +00:00
|
|
|
},
|
2016-05-29 14:38:57 +00:00
|
|
|
sass: {
|
2017-01-29 23:51:08 +00:00
|
|
|
files: ['scss/**/*.scss'],
|
2017-02-03 00:54:45 +00:00
|
|
|
tasks: ['sasslint', 'sass:dev', 'postcss:dev']
|
2016-05-29 14:38:57 +00:00
|
|
|
},
|
|
|
|
js: {
|
2017-01-29 23:51:08 +00:00
|
|
|
files: ['app.js', 'lib/**/*.js'],
|
|
|
|
tasks: ['eslint', 'requirejs:dev']
|
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-browser-sync');
|
|
|
|
grunt.loadNpmTasks('grunt-contrib-watch');
|
2016-05-22 11:23:43 +00:00
|
|
|
};
|