575e784a5f
- Better for device testing - Inject Scss - Split watcher for faster reload - Watch index.html
44 lines
870 B
JavaScript
44 lines
870 B
JavaScript
module.exports = function (grunt) {
|
|
"use strict";
|
|
|
|
grunt.config.merge({
|
|
"browserSync": {
|
|
dev: {
|
|
bsFiles: {
|
|
src: [
|
|
'build/*.css',
|
|
'build/*.js',
|
|
'build/*.html'
|
|
]
|
|
},
|
|
options: {
|
|
open: 'local',
|
|
watchTask: true,
|
|
injectChanges: true,
|
|
server: {
|
|
baseDir: "build",
|
|
index: "index.html"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
watch: {
|
|
html: {
|
|
files: ["html/index.html"],
|
|
tasks: ["copy"]
|
|
},
|
|
sass: {
|
|
files: ["scss/**/*.scss"],
|
|
tasks: ["sasslint", "sass"]
|
|
},
|
|
js: {
|
|
files: ["app.js", "lib/**/*.js"],
|
|
tasks: ["eslint", "requirejs:dev"]
|
|
}
|
|
}
|
|
});
|
|
|
|
grunt.loadNpmTasks("grunt-browser-sync");
|
|
grunt.loadNpmTasks("grunt-contrib-watch");
|
|
};
|