in custom yeoman-generator include one template inside another

All of the template files that I'm using in my app/templates folder share a common header that will be at the top of each file, company name, license, copyright, etc. I don't want to copy and paste this into all the files in my templates folder. So I'm trying to figure out how to just put all the information in a separate file and do some kind of include in all the other template files so if I have to edit it I can just do it in one place.

I've been searching for an example of how to do this but no luck so far so I hope someone here has an answer. Thanks.


There's no support for partial templates currently.

What you can do instead is just providing it as parameter:

<%= license %>

var a = 1;

Then in your generator:

this.fs.copyTpl(from, to, {
  license: getLicenseContent()

Need Your Help

Monotouch framework in existing objective-c app

iphone sdk xamarin.ios

I would like to use my existing objective-c UI layer, but call on a few monotouch functions from objective-c. How can I do that?