Skip to main content

Cheatsheet

package.json
 "scripts": {
"-------------------------------- LINT ----": "----",
"format": "prettier --write **/*.ts{,x}",
"tsc-check": "tsc -v && tsc --noEmit",
"lint": "tsc --noEmit && eslint **/*.ts{,x}",
"fix": "yarn lint --fix && yarn format",
"-------------------------------- DEV ----": "----",
"dev": "next dev",
"dev2": "next dev -p 80",
"start": "next start",
"serve": "yarn build && yarn start",
"export": "next export",
"gen": "graphql-codegen --config codegen.yml",
"ltc": "gulp less",
"-------------------------------- PROD ----": "----",
"build": "next build"
},

Format all file with prettier

yarn format

Typescript check

yarn tsc-check

Eslint check

yarn lint

Find all error before build and deploy

yarn fix

Run app in local environnement port 3000

yarn dev

Run app in local environnement port 80

yarn dev2

Run production ready app

yarn start

Build app

yarn build

Generate all types and hooks base on graphql schema

yarn gen

Generate all css property for dark and light theme from Ant Design Less theme variables

yarn ltc