NextJS Boilerplate
This is a Next.js boilerplate based on the course React Avançado, with some personal flavors like Vitest and Storybook with Vite builder.
What is inside?
- NextJS
- ReactJS
- TypeScript
- Styled Components
- React Testing Library
- Vitest
- Storybook
- Eslint
- Prettier
- Husky
- Lint-Staged
- Plop
Getting Started
You can use this as a boilerplate:
npx degit https://github.com/adeonir/boilerplate-nextjs my-project
Then, run the development server:
yarn dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying src/pages/index.tsx
. The page auto-updates as you edit and save the file.
If you like to try the production build, run:
yarn build
And then:
yarn start
Commands
dev
: runs your application onlocalhost:3000
build
: creates the production buildexport
: exports to static files toout
folder, and can be run standalonestart
: starts a simple server with the build production codelint
: runs the linter in all components and pagesformat
: runs prettier to format all components and pagestest
: runs vitest in watch modetest:coverage
: runs vitest with coverage tabletest:ci
: runs vitest once on CIgenerate
: runs plop to generate component filesstorybook
: runs storybook onlocalhost:6006
storybook:build
: create the production build of storybook
Made with