Background
During my role for the Cabinet Office, I had to work on a number of new projects. All of the projects required the same coding standards, tools, documentation and github workflows to carry out check and deployment.
The solution…
I created my own NPX command called “NextJS Starter kit” tool. Makes it incredibly easy for all team members to setup projects and align our best practices. The added benefit is the set of libraries can be managed from one origin on Github and NPMJS.
The command line automatically generates:
- Latest version of NextJS
- Typescript
- Jest, React library: For unit testing
- Fetch mock: Unit test API fetch calls
- Jest config setup
- React query: For fetch calls
- Eslint setup
- Prettier setup
- ESlint team config rules
- Prettier team config rules
- Storybook: for documenting your components
- Github workflow for storybook pages and deploy
- Github workflow for checking unit tests pass
At the time of release, my project had gained popularity with almost 170 downloads in the first week. Now it averages 10 downloads on weekly basis
Reference
https://github.com/rottitime/frontend-starterkit
https://www.npmjs.com/package/@rottitime/create-starter-kit
Leave a Reply