Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I process multiple files as templates with yeoman generator?

I'm working on a custom generator that I originally wrote with grunt-init. One difference I'm noticing is grunt-init automatically processes all the files in root as templates but with yeoman generator you have to do this using .template(). I'm familiar with how to process any individual file with .template() but is it possible to process an entire directory?

like image 992
user3020693 Avatar asked Nov 22 '13 07:11

user3020693


1 Answers

This issue is an annoying one. I came across this when I used yeoman for the first time. I think the below code snippet can help you.

this.directory('scripts', 'scripts');// script is folder name
like image 66
dabeng Avatar answered Sep 17 '22 13:09

dabeng