joshwcomeau/new-component

Add "Undo" functionality

Ouverte

#6 ouverte le 6 sept. 2017

 (3 commentaires) (0 réaction) (0 personne assignée)JavaScript (138 forks)github user discovery
enhancementhelp wanted

Métriques du dépôt

Stars
 (759 étoiles)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

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.

Guide contributeur