I'm attempting to create a project using Yeoman from a template. I am able to successfully copy all files from the Portanova template folder, but I encounter an error when trying to copy a file from another template folder and add it to my project. The exception message states "illegal operation on a directory". Can someone please advise what I might be doing incorrectly?
this.log(yosay(
'Welcome to the amazing ' + chalk.red('') + ' generator!'
));
var prompts = [{
name: 'projectName',
message: 'What would you like to name your new project?'
},{
name: 'answer',
message: 'Do you want to include File X?'
}
];
this.prompt(prompts, function (props) {
this.projectName = props.projectName;
this.answer = props.answer;
done();
}.bind(this));
},
writing: function () {
this.fs.copy(
this.templatePath('portanova_template'),
this.destinationPath(this.projectName)
);
if(this.answer == 'yes'){
this.fs.copy(
this.templatePath('externalTemplate/fileX.html'),
this.destinationPath(this.projectName+'/app')
);
}
},