plopjs/plop

Base path with relative path fails to find templates

开放

#240 创建于 2020年9月19日

 (5 条评论) (1 个反应) (0 位负责人)JavaScript (266 个派生)batch import
buggood first issuehelp wanted

仓库指标

星标
 (6,845 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

Hi. I am using plop to generate a lot of boilerplate for my projects and it works great. Just encountered a scenario where,

THIS WORKS

{
                type: "addMany",
                destination: "./path/to/{{camelCase name}}",
                base: `my/templates`,
                templateFiles: "my/templates/**/*",
                stripExtensions: ["txt"],
                verbose: true,

 }

THIS DOES NOT WORK

{
                type: "addMany",
                destination: "./path/to/{{camelCase name}}",
                base: `./my/templates`,
                templateFiles: "my/templates/**/*",
                stripExtensions: ["txt"],
                verbose: true,

 }

The only difference is the prefix of ./ in the base config and plop is not able to find any files when using that. I am not sure if it is intended but thought i would let you know.

贡献者指南