浏览代码

allow theme subfolders

allows custom themes to import files from subfolders inside the `css/theme/source` folder.

in `css/theme/source/custom-theme.scss` we can now do
```scss
@import `custom-theme/controls`
@import `custom-theme/headings`
...
```
t-fritsch 1 年之前
父节点
当前提交
ba20abf0c3
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      gulpfile.js

+ 2 - 2
gulpfile.js

@@ -164,7 +164,7 @@ function compileSass() {
 
     sass.render({
         data: transformedFile.contents.toString(),
-        includePaths: ['css/', 'css/theme/template']
+        file: transformedFile.path,
     }, ( err, result ) => {
         if( err ) {
             console.log( vinylFile.path );
@@ -305,7 +305,7 @@ gulp.task('serve', () => {
     gulp.watch(['plugin/**/plugin.js', 'plugin/**/*.html'], gulp.series('plugins', 'reload'))
 
     gulp.watch([
-        'css/theme/source/*.{sass,scss}',
+        'css/theme/source/**/*.{sass,scss}',
         'css/theme/template/*.{sass,scss}',
     ], gulp.series('css-themes', 'reload'))