joshwcomeau/new-component

Add "Undo" functionality

オープン

#6 opened on 2017/09/06

 (3 件のコメント) (0 件のリアクション) (0 人の担当者)JavaScript (138 件のフォーク)github user discovery
enhancementhelp wanted

Repository metrics

Stars
 (758 個のスター)
PR merge metrics
 (30d に merged 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.

コントリビューターガイド