Line 'css/????????': 'sass/????????'
下面是我整理不出来的。由于有多个目录和 SASS 文件级别,我安装了 sass-globbing。我的/sass目录下有4个独立编译的sass文件。
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
watch: {
sass: {
files: ['sass/{,**/}*.{scss,sass}'],
tasks: ['sass:dist']
},
},
sass: {
options: {
sourceMap: false,
outputStyle: 'expanded'
},
dist: {
files: {
'css/???????': 'sass/???????'
}
}
}
});
grunt.registerTask('default', ['sass:dist', 'watch']);
grunt.loadNpmTasks('grunt-sass');
grunt.loadNpmTasks('grunt-contrib-watch');
};
最佳答案
这应该有效;
dist: {
files: {
'css/style.css': 'sass/**/*.scss'
}
}
关于css - Gruntfile.js SASS 任务配置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27476833/