Gruntfile.js
在我的Gruntfile.js中,我有以下观察任务:
watch: {
css: {
files: ['sass/**/*.scss'],
tasks: ['compass'],
options: {
spawn: false,
}
},
/* More watched tasks bellow */
}
SASS
我的sass文件夹有一个主文件和文件夹,用于包含这样的文件:
/sass/main.scss
/sass/includes/file.scss
CSS
当手表自动生成目标文件夹中的所有内容时,我有:
/css/main.css /* it includes everything from the main.scss including all @imports */
/css/includes/file.css /* includes stylesheets from the imported file. But this is useless file and /include/ folder is also an extra, that I do not need. */
我认为这是配置行中的一个问题:
files: ['sass/**/*.scss']
但我不知道如何描述以某种方式我只获得一个css文件夹和一个main.css文件而没有额外的文件夹和文件
答案 0 :(得分:1)
您应该更改包含文件的名称:
/sass/includes/file.scss -> /sass/includes/_file.scss
您可以在此处找到更多信息
:
http://sass-lang.com/documentation/file.SASS_REFERENCE.html#partials