Plop is a little node package that will ease your life whenever you need to create a new controller / router / helper / …
Hey, that’s damn easy to create a new controller: copy-paste another controller code, delete specific lines you won’t use. Tadaaa!
Well, now pop a bunch of legitimate questions:
- Which “other” controller do you speak about? The more recent? The “best” coded? Is there any reference controller around there?
- How can I get the previous point if I’m not — yet — an expert of the project codebase?
- How can I ensure I’m correct when I name the new file? When I delete lines I consider “useless”?
- Do I need to declare this new controller in some existing file? Which one? How?
Find a good file, open it, copy its content, create a new file, paste the content, delete useless lines… It’s repetitive, error prone and doesn’t have a lot of added value. And that could take some time. Most of all, that’s frequent!
It would just be awesome to write ` plop` in your terminal, answer 2 questions and BIM, you’re all set!
That’s exactly what I’m talking about here.