找不到SassDoc @import或无法读取

时间:2019-05-13 15:52:52

标签: sass compiler-warnings node-sass scss-mixins

我正在使用SassDoc + herman主题记录Sass项目。我在以'tools'开头的文件中定义@mixins。每个@mixin都在其自己的文件中定义,我也想使用每个文件来呈现@example文档。 @example文档应包含编译为css的scs,如this documentation中所述。

config.yaml

herman:
  sass:
    includepaths:
        - 'css/my_theme/scss/helpers/tools/'
  customCSS: 'css/my_theme/docLibraryExamples.css'

_tools.font-weight.scss

...

/// @example html
///     <div class="className">This is semiBold font</div>
///
/// @example scss
///     @import "_tools.font-weight.scss";
///     .className { @include font-weight(semiBold); }
///

@mixin font-weight($weight) {
    $weights: ( ..., semiBold: 600, ... );

    ...

    font-weight: $output;
}

终端错误

» [WARNING] Error compiling @example scss:
File to import not found or unreadable: _tools.font-weight.scss.
@import "_tools.font-weight.scss";
.className { @include font-weight(semiBold); }

是什么原因导致文件导入错误找不到或不可读?

0 个答案:

没有答案