Run the development server:
npm run dev
Open http://localhost:3000 with your browser
Staged files are linted with lint-staged
when committing
Lint files:
npm run lint
Build and export:
npm run build
Serve folder out:
npx serve out
Branch develop
is deployed automatically to github-pages
with CircleCI config
This is a Next.js project bootstrapped with create-next-app
.
-
Images should be stored in folder public, and used with
next/image
component -
Images in scss should be referenced with
url('~/public/...')
- NextJS pages folder for routing, works like magic!
- CSS Modules and utility classes for component styling (no CSS-in-JS)
- Use suomifi-ui-components wherever possible, even use
<Block>
instead of<div>
- Caveat: Because of styled-components specificty issues,
<div>
is preferable in high lever wrappers
- Caveat: Because of styled-components specificty issues,
- Non-page level React components and their stylesheets live here
- Common place to store general interfaces
- Components for NextJS layout pattern
- Contains global CSS classes which can be used anywhere (like
.container
) - Also contains utility CSS classes like margin helpers. Created from suomifi-tokens
- Breakpoints and their helper mixins
- Misc stuff