Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resource folder setters should not allow root-level assets. #5

Closed
adam-coster opened this issue Oct 1, 2020 · 0 comments
Closed

Resource folder setters should not allow root-level assets. #5

adam-coster opened this issue Oct 1, 2020 · 0 comments

Comments

@adam-coster
Copy link
Member

set folder(folderName:string){
if (folderName.match(/\.yyp/g)){
//This means the resource should be at the root level of the project, such as
// "parent": {
// "name": "sample-project",
// "path": "sample-project.yyp",
// },
this.yyData.parent.name = folderName.replace(/\.yyp/g, "");
this.yyData.parent.path = folderName;
}
else{
this.yyData.parent.name = folderName;
this.yyData.parent.path = `folders/${folderName}.yy`;
}
this.save();
}

The resource folder setter does not take into account root-level resources, which use a totally different system for naming parents. For now we should throw an error when there is an attempt to use root-level folders, since they'll make everything more complicated and aren't strictly required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant