A lightweight react template. A simple start with linting, formating and testing.
npm install -g yonpm install -g generator-react-tdd
Existing sub commands (explained below)
yo react-tdd:atomyo react-tdd:moleculeyo react-tdd:organismyo react-tdd:page
1. Generate an react project
Enter the name of the project in capital case
? Your project name : Myproject
Enter the created project folder. Init the git repository and install packages:
cd Myprojectgit inityarn install
2. Adding components
I prefer to split my components on their size. I have chosen to follow the Atomic design format. Based on this design pattern I would sort my components in folders atom, molecules, organisms and pages.
2.1 The command structure for components generation is the follow.
yo react-tdd:<component type>
For example you want to create an atom. Then you have to execute
The prompt will reply:
? Atom module name:
Enter the component name with capital case.
1. start development server
3. start storybook
4. test with coverage
MIT © alexanderkrum