node.js - 使用 mem-fs-editor copyTpl 但希望从复制中排除某些文件
问题描述
fs-editor 但我不想复制某些文件。
if (this.answers[plugin] !== 'none' && plugin !== 'name') {
this.fs.copyTpl(
this.templatePath(`plugins/${this.answers[plugin]}`),
this.destinationPath(`public/${this.answers.name}`),
{answers: this.answers},
{globOptions: {options: ['test.js']}}
)
}
这是我的代码,我试图忽略 test.js 文件,因此它不会被复制,但上面的代码不起作用。有任何想法吗?
解决方案
推荐阅读
- python - 如何从脚本中覆盖 hydra 工作目录?
- azure - Azure PowerShell - 从所有订阅中获取 VM 使用情况
- javascript - 尝试滑动上一个和下一个图像时出错
- android - Room DB 使用 @Relation 将表 A 连接到表 B 和 B 到 C
- javascript - 动态确定下一个和上一个相似的日期范围
- javascript - 如何使用 Webpack 和 React 预加载 css?
- ios - Xcode 似乎对函数所需的参数类型感到困惑
- r - For 循环适用于初学者 - 它如何在 R 中更好地工作?
- java - 如何递归地添加4个或更多数字?
- sql - 左加入与不退出