next-emotion
next-emotion copied to clipboard
Template repo with Next.js, Emotion styling, Storybook, and TypeScript
Next.js Template

Want a template application with all 100's on Lighthouse? Look no further, this is a simple template application with the following stack:
- Next.js
- Emotion
- TypeScript
- React
- Cypress
- Storybook - Deployed storybook example
- Chromatic - Deployed library example
- GitHub
- Kodiak
- Dependabot
- Yarn
- ESLint
- Prettier
- Husky
Installation
You must have yarn and node>=12.16.1 installed first. To install the dependencies run:
yarn install
To start the application in development mode run:
yarn dev
To run a static version of the site locally run:
yarn static
Testing
Run unit tests:
yarn test
Run e2e tests:
yarn cypress run
Scripts provided
installinstall dependenciesdevrun in dev mode with hot-module replacement @ http://localhost:3000/buildbuild next.js applicationexportexport next.js static application to./outstaticbuild/export/serve a static next.js application @ http://localhost:3000/validaterun tests/linter/type-checks/format-checks and build the application (the build checks for transpiler errors)testrun jest testscypressrun cypresslintrun linter with--fixlint:testrun linterformatformat code w/ prettierformat:testcheck for code formatting w/ prettier (won't modify code)storybookruns storybook @ http://localhost:6006storybook:buildbuilds storybook output for static deployment (necessary for Chromatic)
Husky Hooks
pre-commitlints the staged files and formats them automaticallypre-pushruns the validate script
Setup
Chromatic & Github
To enable Chromatic, set the CHROMATIC_PROJECT_TOKEN secret:

Screenshots
Chromatic - Storybook

Chromatic - Library
