-
Notifications
You must be signed in to change notification settings - Fork 4
Next.js Starter Documentation
-
npm run dev
- Runsnext dev
to start Next.js in development mode -
npm run build
- Runsnext build
to build the application for production usage -
npm run start
- Runsnext start
to start a Next.js production server -
npm run lint
- Runsnext lint
to set up Next.js' built-in ESLint configuration -
npm run storybook
- Starts Storybook locally -
npm run build-storybook
- Builds Storybook for production -
npm run todo
- Runs least to create a list of items marked for attention -
npm run commit
- Displays a prompt to create a commit message
This describes the folder layout of the Next.js Starter:
├── .storybook
├── app
| ├── components
| ├── atoms
| ├── molecules
| ├── organisms
| ├── scss
| ├── templates
| ├── wordpress (example)
├── functions
| ├── wordpress
├── lib
| ├── Wordpress
├── styles
| ├── minimal
This folder holds the configuration for Storybook.
This folder contains the various React components that make up the website. They are organized into folders based on the Atomic Design system.
This folder contains valuable functions for the front end.
This folder contains the functions for communicating with the different APIs in the project. There is a folder for each specific API with a connector.js
file for managing that connection:
-
wordpress
: for communicating with the headless WordPress install. The majority of the work will be in this folder.In the
wordpress
folder, there are two folders worth pointing out:-
_partials
contains fragments of GraphQL queries that are used in multiple places. -
_global
contains functions that are not tied to particular features, especially ones used in the creation of pages.
-
This folder contains global project styles organized in sub-directories allowing developers to choose which CSS framework, if any, is needed for the project.
-
minimal
: a minimal CSS framework by Entermedia.
Update the tsconfig.json
file path for the @theme/*
paths property to point to your chosen CSS framework to make it easier to import needed files.