Skip to content

haskamp/next.js-template

Repository files navigation

Next App

This is a template for a Next.js app.

It uses the following tools/libraries:

Getting started

Run the development server:

npm run dev

Run storybook:

npm run storybook

Atomic design

We use atomic design. You can read more about our decision in the documentation.

Behavior Driven Development

We use behavior tests. You can read more about our decision in the documentation.

Test Driven Development

We jest to write unit tests. Please look at the Documentation for Jest and testing-library.

Commitlint

We use commitlint to ensure conventional commit messages. You can read more about our decision in the documentation.

Commands

Run the development server:

npm run dev

Build:

npm run build

Run storybook:

npm run storybook

Build storybook:

npm run storybook:build

Run e2e tests:

npm run cypress # local without server
# npm run cypress:run # headless
# npm run test:e2e # with server

Run unit tests:

npm run jest
# npm run jest:watch # watch
# npm run test:unit # same as "npm run jest"

Run all tests:

npm run test

Run stylelint

npm run stylelint

Run eslint

npm run eslint

Run all linters

npm run lint

Skipping linters

If you need to skip a linter you can add the --no-verify flag.

Warning! We strongly advise against skipping linters.

# Skipping commitlint
git commit README.md -m "this is a dirty commit" --no-verify
# Skipping linters
git push --no-verify