相关疑难解决方法(0)

如何使用fs.copyTpl忽略Yeoman中的文件

我如何忽略文件?我想排除任何子目录中以_开头的所有文件。这两种方法我都没有成功:

this.fs.copyTpl(
   this.templatePath('basicFiles/'),
   this.destinationPath(''),
   answers,
   {ignore:"_*.*"}
);

this.fs.copyTpl(
  [!*.*,this.templatePath('basicFiles/')],
  this.destinationPath(''),
  answers
);
Run Code Online (Sandbox Code Playgroud)

更笼统地说,想将每个basic / _exmaple.json合并(深层复制)到AdditionalConfig / example.json到desitnationPaht / exmaple.json(合并)。

每个想法都是受欢迎的:)。

json yeoman yeoman-generator

4
推荐指数
1
解决办法
721
查看次数

标签 统计

json ×1

yeoman ×1

yeoman-generator ×1