英文:
Delete or undo Buffalo resource generation
问题
我使用以下命令在Buffalo中生成了一个资源:
buffalo g resource <name> <flags>
我意识到在生成资源时犯了一个错误,我该如何:
- 撤销资源的生成?
- 移除/销毁资源?
我在Buffalo的文档或buffalo g resource --help
消息中没有找到相关信息。
英文:
I have generated a resource in Buffalo using the command:
buffalo g resource <name> <flags>
I have realized I have made a mistake in this resource generation, how do I
- Undo the generation of the resource?
- Remove/Destroy the resource?
I do not see this in Buffalo's documentation or the buffalo g resource --help
message.
答案1
得分: 4
你可以使用destroy cli,幸运的是有一个destroy resource
命令可以帮助你,你可以这样做:
buffalo d resource <name>
它会指导你删除哪些内容,或者你可以传递--yes标志来简单地删除所有相关文件。例如:
buffalo d resource <name> --yes
或者
buffalo d resource <name> -y
英文:
You could use the destroy cli, fortunately there is a destroy resource
command to help, you can do something like:
buffalo d resource <name>
And it will guide you on which things to remove, or you could pass the --yes flag to simply remove all associated files. p.e:
buffalo d resource <name> --yes
or
buffalo d resource <name> -y
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论