plopjs/plop

Base path with relative path fails to find templates

Open

#240 aperta il 19 set 2020

Vedi su GitHub
 (5 commenti) (1 reazione) (0 assegnatari)JavaScript (266 fork)batch import
buggood first issuehelp wanted

Metriche repository

Star
 (6845 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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.

Guida contributor