Tuesday, 14 March 2017

delete all files in folder

how to delete files in project catalogue during yeoman process?

initializing() {
    this.sourceRoot('./generators/templates');
    this.destinationRoot('./generators/project');

    console.log(this.destinationPath());
    console.log(this.sourceRoot());

    this.fs.delete(this.destinationPath());
    this.fs.delete(this.destinationPath('**/*'));
    this.fs.delete('project');
    this.fs.delete('./generators/project');
    this.fs.delete('generators/project');
    this.fs.delete('generators/project/**/*');
}

non of these seems to work :(



via user1075940

No comments:

Post a Comment