1
在我的Drupal 8項目運行繁重的青菜我有哪裏裏面每個主題的我有兩個目錄SCSS和CSS自定義模塊,這樣的結構是這樣的:如何在幾個目錄使用通配符在Drupal 8
- modules
- custom
- my_module_1
- scss
- css
- my_module_2
- scss
- css
- themes
- my_theme
- Gruntfile.js
在我的Gruntfile.js中我想告訴sass通過每個自定義模塊並作爲源文件在scss文件夾上運行,並且css文件夾應該是目標文件夾。
到目前爲止我有這樣一個任務如下:
sass: {
prod:{
options: {
sourceMap: false,
outputStyle: 'compressed',
includePaths: ['scss']
},
files: {
'../../modules/custom/my_module_1/css/file1.css': '../../modules/custom/my_module_1/scss/file1.scss',
'../../modules/custom/my_module_1/css/file2.css': '../../modules/custom/my_module_1/scss/file2.scss',
'../../modules/custom/my_module_2/css/file1.css': '../../modules/custom/my_module_2/scss/file1.scss'
}
}
}
,你可以看到它是多餘的,怎樣才能使它更清潔的一個通用命令(也許使用通配符,但我不能明白這一點尚未)
謝謝。
你嘗試過這樣的:'」 ../../modules/custom/*/css/*.css‘:’ ../../ modules/custom/*/scss/*。scss','我不太清楚,但我知道星號在grunt中是通配符。 – Ronnie