如何在gulp中使用styledown?

时间:2018-08-25 19:44:54

标签: javascript gulp

我有任务

gulp.task('generate-styleguid',() => {
  'use strict';

  return gulp.src('./src/styleguid')
    .pipe(styledown({
      config: './src/styleguid/config.md ',
      filename: './src/styleguid/styleguide.html'
    }))
    .pipe(gulp.dest('./src/styleguid/'))
})

运行它时出现错误: fs.js:646   返回binding.open(pathModule._makeLong(path),stringToFlags(flags),mode);                  ^ 错误:ENOENT:没有这样的文件或目录

screen

路径可能有问题吗?以及如何解决?

1 个答案:

答案 0 :(得分:1)

您的路径中config.md后面有多余的空格。

config:'./src/styleguid/config.md'行应为 config:'./src/styleguid/config.md', < / p>