If you have been doing any sort of serious Angular dev work you have probably come across the Angular CLI; the one stop shop for generating Angular applications, components, routes, services and pipes, as well as scripts for linting, testing, serving and formatting your app.
If you haven’t used it, shame on you! (not really, but seriously you should check it out).
Why do I love the Angular CLI?
- Saves time
- Improves standardisation (There’s nothing I hate more than endless arguments about spaces vs. tabs or any other non-important chin stroking bullshit)
- Makes it easy to do things that you really should be doing as a responsible person, like testing your code, linting your code etc.
- Supports aggressive refactoring, as it becomes very painless to spin up new components etc. in no time.
- You can write your own generators for it now!
Does the React community have any equivalent functionality?
YES! (sort of…), enter create-react-app
create-react-app is a command line tool for spinning up a new React project.
ng new angular-app
What’s the difference?
They both whirred away and did some magical things and created a project for me, complete with scripts for building, testing and serving it.
It looks like I will have to do some more investigations into tooling for generating React components etc., but while I’m learning I’ll probably be hand coding these anyway so not the end of the world.
Initial impressions are that the React scaffolding project is a bit less fully featured than the Angular one, but maybe that’s a good thing. One of the complaints levelled at Angular is that it is too bloated. I guess we will see over the next few weeks!