首页 > 解决方案 > 使用 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 文件,因此它不会被复制,但上面的代码不起作用。有任何想法吗?

标签: node.jsfiletemplatespluginsfs

解决方案


推荐阅读