I';我在使用Herman for sassDocs的json导出功能构建色样时遇到问题

I';我在使用Herman for sassDocs的json导出功能构建色样时遇到问题,sass,gulp-sass,herman,Sass,Gulp Sass,Herman,问题: 我有一个从到json.css的sass,其中唯一打印的是从@导出的注释,包括herman export。我是否需要手动取消注释该JSON和/或重命名该文件以具有JSON扩展名 我的.sassdocrc文件: dest: public/docs theme: node_modules/sassdoc-theme-herman verbose: true herman: sass: sass.jsonfile: public/json/sass-to-json.css 然后,

问题: 我有一个从
到json.css的sass,其中唯一打印的是从
@导出的注释,包括herman export。我是否需要手动取消注释该JSON和/或重命名该文件以具有JSON扩展名

我的
.sassdocrc
文件:

dest: public/docs
theme: node_modules/sassdoc-theme-herman
verbose: true

herman:
  sass:
    sass.jsonfile: public/json/sass-to-json.css
然后,我的sass-to-json.scss文件只包含两个存在herman代码的导入和导出mixin。(我不确定是否所有这些都是必要的,但json编译正确)

编译为sass-to-json.css。我已尝试删除注释,使其成为有效的json,并将文件重命名为.json。但我得到了相同的结果,那就是herman编译页面时没有样例,也没有错误:

/*! json-encode: {"colors": {"theme": {"shade": "#16161e", "tint": "#f0f0fb", "dark-grey": "#393946", "grey": "#7d8c9c", "white": "#fff", "black": "#000", "blue": "#0c55b7", "green": "#3fbb26", "yellow": "#e7b60a", "red": "#e71b46"}}} */
my colors.scss文件的相关位:

/// @group color
/// @colors theme
$theme: (
  'shade': #16161e,
  'tint': #f0f0fb,
  'dark-grey': #393946
);

@include herman-add('colors', 'theme', $theme);
您的Sass(以及使用
herman add
herman export
)看起来很棒!无需将生成的
sass到json.scss
文件的内容弄乱;它应该是一个有效的Sass注释,Herman自己将负责将其解析为有效的JSON

文档有点不清楚,但是这里的相关选项是嵌套在
sass
选项下的
jsonfile
,而不是
sass.jsonfile
。例如:

dest: public/docs
theme: herman
verbose: true

herman:
  sass:
    jsonfile: public/json/sass-to-json.css
(请注意,您也可以将
herman
指定为主题,SassDoc将自动查找
node\u modules/SassDoc theme herman

您的Sass(使用
herman add
herman export
)看起来很棒!无需将生成的
sass到json.scss
文件的内容弄乱;它应该是一个有效的Sass注释,Herman自己将负责将其解析为有效的JSON

文档有点不清楚,但是这里的相关选项是嵌套在
sass
选项下的
jsonfile
,而不是
sass.jsonfile
。例如:

dest: public/docs
theme: herman
verbose: true

herman:
  sass:
    jsonfile: public/json/sass-to-json.css
(注意,您也可以将
herman
指定为主题,SassDoc将自动查找
node\u模块/SassDoc主题herman