NEXTJS BOILERPLATE
About this project
This is a boilerplate to be use in your project with tecnologies NextJS, TypeScript, Storybook, Styled-components, Jest & React-testing-library.
Technologies
Run this project
# Creating your project using this boilerplate
$ yarn create next-app -e https://github.com/jefferson1104/boilerplate-nextjs PROJECT_NAME
# Project directory
cd PROJECT_NAME
# Install dependencies
$ yarn
# Run project
$ yarn dev
Commands
yarn dev
: run application onlocalhost:3000
yarn build
: creates the production build versionyarn start
: starts a simple server with the build production codeyarn lint
: runs ESLint to test all components and pagestest
: run Jest to test all components and pagestest:watch
: run Jest to test in watch modeyarn storybook
: run storybook onlocalhost:6006
yarn generate
: create the component structure in an automated way
Init Husky in your project
Execute command: npx husky-init && yarn
In the pre-commit file inside the .husky directory .husky/pre-commit Change line content npm test
to npx --no-install lint-staged