Next.js & React app
node
version is correct, to do this run nvm use
, if the version is not correct run nvm install [correct version]
..env
file like .env.example
and ask the admin for the required keys.git submodule update --init
to update submodules.npm install
or make install
scripts.make start
to run dev servernvm use
- set correct node
versionnpm start
- to run dev server with hot-reloading (npm run dev
)npm run start:prod
- to build and run a production versionnpm run build
- to build a production version (WIR_ENV=staging
must be set for dev.wir.by
)npm run local-backend
- to run dev server that uses http://localhost:8080
as backendnpm run deploy-from-local
- to deploy code on dev.wir.by
npm run lint
- to check code style with eslint
,
airbnb
react style guide and
prettier
npm run lint
- to just fix style with prettier
and check on eslint
errorsnpm run update-dict
- to fetch translations from GoogleDrive and store it in data/i18n.json
(gitignored)npm run reset-cache
- to delete .next
builded & cached filesnpm run size
- to check client-side bundle sizes with @ai/size-limit
npm run analyze
- to run @next/bundle-analyzer
we have autoversioning set up, in order to trigger new release one should follow the conventions:
fix(<scope>): <subject>
- increases patch version: 1.0.0 -> 1.0.1style(<scope>): <subject>
- increases patch version: 1.0.0 -> 1.0.1feat(<scope>): <subject>
- increases minor version: 1.0.0 -> 1.1.0major(<scope>): <subject>
- increases major version: 1.0.0 -> 2.0.0all commit messages checked with commitlint, feel free to add new scope
's and type
's to .commitlintrc.js