I want to pass the name of my project into a number of different files, none of which are html files.
Is it possible to do something like the example below for non html files?
writing: function() {
// takes two arguments: sourcePath, destPath
this.fs.copy('_someTpl', 'Jenkinsfile', {data: this.tplData});
}
Or is there a way to write the data to an html file and read the content of the html file within a Jenkinsfile? Thanks in advance!
Yeoman doesn't care what kind of file you're copying. For Yeoman, it's only text files.
I think your issue is using copy
instead of copyTpl
. Only copyTpl
will inject the data in the template.