我试图从一个模板生成一个与约曼的项目。我可以复制portanova模板文件夹中的所有文件,但不能复制其他模板文件夹中的文件并将其添加到我的项目中。它给我一个异常“非法操作的目录”。我做错了什么?
this.log(yosay(
'Welcome to the fantabulous ' + chalk.red('') + ' generator!'
));
var prompts = [{
name: 'projectName',
message: 'What do you want to call the new project ?'
},{
name: 'answer',
message: 'would you like to add 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')
);
}
},发布于 2016-03-22 18:01:05
检查您是否有权从第二个文件夹复制,如果没有,请尝试以下操作:
chmod -R 777 /Your/folderPs (-R :处理文件夹)
https://stackoverflow.com/questions/36150839
复制相似问题