首页 > 解决方案 > 如何在 gulp 中使用 styledown?

问题描述

我有任务

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 return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode); ^ 错误:ENOENT:没有这样的文件或目录

屏幕

路径会不会有问题?以及如何解决?

标签: javascriptgulp

解决方案


config.md在你的路径之后有一个额外的空间。

config: './src/styleguid/config.md',应该是config: './src/styleguid/config.md',


推荐阅读