Next.js & React app
- You have to check that your
node
version is correct, to do this runnvm use
, if the version is not correct runnvm install [correct version]
. - Create an
.env
file like.env.example
and ask the admin for the required keys. - Run
git submodule update --init
to update submodules. - Run
npm install
ormake install
scripts. - Run
make start
to run dev server
nvm use
- set correctnode
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 fordev.wir.by
)npm run local-backend
- to run dev server that useshttp://localhost:8080
as backendnpm run deploy-from-local
- to deploy code ondev.wir.by
npm run lint
- to check code style witheslint
,airbnb
react style guide andprettier
npm run lint
- to just fix style withprettier
and check oneslint
errorsnpm run update-dict
- to fetch translations from GoogleDrive and store it indata/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.0
-
all commit messages checked with commitlint, feel free to add new
scope
's andtype
's to.commitlintrc.js