2016-03-22 3 views
0

Ich versuche, das Projekt mit Yeoman aus einer Vorlage zu generieren. Ich kann alle Dateien aus dem Portanova-Vorlagenordner kopieren, aber ich kann keine Datei aus einem anderen Vorlagenordner kopieren und in meinem Projekt hinzufügen. Es gibt mir Ausnahme "illegale Operation auf einem Verzeichnis". Was mache ich falsch?generating project with yeoman

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') 
    ); 
    } 
    }, 

Antwort

0

überprüfen, ob Sie das Recht hat, aus dem zweiten Ordner zu kopieren, wenn nicht versuchen, diese:

chmod -R 777 /Your/folder 

Ps (R: auf einem Ordner zu arbeiten)