how can i ignore files? i want to exclude all file starting with _ in any subdirectory. i have no success with these two approaches:
this.fs.copyTpl(
this.templatePath('basicFiles/'),
this.destinationPath(''),
answers,
{ignore:"_*.*"}
);
this.fs.copyTpl(
[!*.*,this.templatePath('basicFiles/')],
this.destinationPath(''),
answers
);
More general, would like to merge(deep copy) every basic/_exmaple.json into additionalConfig/example.json to desitnationPaht/exmaple.json (merged).
Every idea is welcome :).
For fs.copyTpl
your {ignore:"_*.*"}
needs to be in the 5th argument object (as the syntax says) and inside globOptions
key:
this.fs.copyTpl(
this.templatePath('**/*'), // from
this.destinationRoot(), // to
{}, // context // not here
{}, // templateOptions // not here
{ globOptions: {ignore:"_*.*"} } // < but here
)
Same for {dot: true}
and other such options.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With