以下是我的grunt文件,使用 grunt-sass 和 grunt-contrib-watch 来 编译我的Sass。是否可以将错误记录到chrome?
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
// Sass to CSS
sass: {
app: {
files: [{
expand: true,
cwd: 'wp-content/themes/bones/library/scss',
src: ['*.scss'],
dest: 'wp-content/themes/bones/library/css',
ext: '.css'
}],
},
options: {
sourceMap: true,
outputStyle: 'nested',
imagePath: "../",
}
},
watch: {
sass: {
files: ['wp-content/themes/bones/library/scss/{,*/}*.{scss,sass}'],
tasks: ['sass']
},
options: {
livereload: true,
spawn: false
}
},
});
grunt.loadNpmTasks('grunt-sass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('default', ['sass', 'watch']);
};