The crab command line utility is intended as a CLI for React. It is drawn from extensive experience with the value of the comprehensive Ember CLI tool, but also inspired in part by VueCLI and create-react-app.
You can use crab to speed up your React development workflow, quickly scaffolding an app or adding new components instantly. This also includes full support for Redux.
npm install -g crab-cli
Crab differs from create-react-app in three core ways.
Create a new React app with crab, scaffolding up an app into the provided directory.
The app created is built for rapid development, and is set up with some example routes, instructions for how to get started, working sass impementation, and support for some advanced JavaScript features like async/await.
Optionally you can also scaffold with full Redux support, which will handle all the boilerplate and bindings that comes with React + Redux.
cd ~/Code crab create my-new-app --redux cd my-new-app crab generate components/ContactUs --redux parcel index.html code .
This will create an app with redux support, build and serve the application at http://localhost:1234 with hot module reloading, add a new redux-aware component for a contact page, and open it for editing in Visual Studio Code.
Option | Description |
-r, --redux | Include redux dependencies and files, and create App as a working redux aware container |
-t, --typescript | Create a TypeScript project. This will save as a permanent setting |
--no-git | Skip git setup, does not init repository or add a .gitignore file to application |
Hello! My name is Matt Burgess and I made this website, and wrote Crab itself.
My day job is at CivicLedger, where I mostly work on crytocurrency applications for government and enterprise.
I write a lot on Medium, and also make some pretty eclectic software shared on Github. Or feel free to stop by and say hi on Reddit. Or don't. Whatever.