joshwcomeau/new-component

Add "Undo" functionality

开放

#6 创建于 2017年9月6日

 (3 条评论) (0 个反应) (0 位负责人)JavaScript (138 个派生)github user discovery
enhancementhelp wanted

仓库指标

星标
 (758 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

Often, I'll realize right after creating a component that I did it wrong.

Maybe I meant to make a functional component, but forgot the flag. Maybe I realized it has the wrong name (or I typo'ed the name).

Right now the solution is rm -rf src/components/ThingYouJustCreated, which is a little burdensome, and I worry I might make a mistake with that and delete the wrong thing.

I think it'd be neat if you could do:

$ new-component-undo

This will delete the component 'ThingYouJustCreated`. 
Press enter to continue, or any other key to cancel.

贡献者指南