简体   繁体   English

从位中删除旧的组件版本

[英]Delete older component version from bit

I know, from github we can delete older version.我知道,从 github 我们可以删除旧版本。 Is there option to delete older version of components created using bit.dev?是否可以选择删除使用 bit.dev 创建的旧版本组件? if yes, can you guide me through it?如果是的话,你能指导我完成吗? How older version can be deleted?多长时间可以删除旧版本?

In Bit, when you want to remove a component, you want to deprecate it.在 Bit 中,当你想删除一个组件时,你想deprecate它。 Deleting a component is dangerous: it can lead to possible damage to dependent components and projects.删除一个组件是危险的:它可能导致依赖组件和项目的损坏。 You will need to refactor its dependents to guarantee its functioning.您将需要重构其依赖项以保证其功能。

Instead, you will want to deprecate them:相反,您将要弃用它们:

bit deprecate <component-name>

Now, instead of just deprecating them, you can also provide a new-id if you intend to replace them with another component:现在,如果您打算用另一个组件替换它们,您还可以提供一个new-id ,而不是仅仅弃用它们:

bit deprecate <component-name> --new-id <new-component-id>

Once deprecated the component, don't forget to snap / tag and export .一旦弃用该组件,不要忘记snap / tagexport

Docs文档

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM