(新手帖)
我为这棵树使用了 Grunt :
Gruntfile.js:
module.exports = function(grunt) {
grunt.initConfig({
sass: {
dist: {
options: {
style: 'expanded'
},
files: {
'css/style.css': 'Component/**/*.scss',
}
}
},
watch: {
css: {
files: 'Component/**/*.scss',
tasks: ['sass']
},
},
});
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('default',['watch']);
}
它运行没有任何错误,但它不带任何文件。style.css
还是空的。
当我替换这一行时:
files: {
'css/style.css': 'Component/**/*.scss',
}
和 :
files: {
'css/style.css': 'Component/header/header.scss',
}
它正确地接收.css
文件。header/
这两种语法中的任何一种都没有任何错误。
任何的想法 ?