I am using yeoman for creating a scaffold for my app.
I want to copy all the directory recursively thats why I am using this.directory
method
this.directory('views/static/views', '.views/static/views');
Now whenever I am running it shows an error showing <%= title %> in file index.html during copying is not defined.
This <%= title %>
is not the part of Templating but I am using this for my other purpose.
I want to disable the templating while copying using this.directory
method.?
I figure it out.
using this.fs.copy
copies recursively without templating.
writing: function () {
this.fs.copy(
this.templatePath('views/static/views'),
this.destinationPath('.views/static/views')
);
}
Now when templating the correct syntax should be
writing: function () {
this.fs.copyTpl(
this.templatePath('index.html'),
this.destinationPath('public/index.html'),
{ title: 'Templating with Yeoman' }
);
}
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