- Git - Download & Install Git.
- Node.js - Download & Install Node.js and the npm package manager.
- (optional) Download & Install some
node version manager
(e.g.nvm
,n
, etc.)
- (optional) Download & Install some
v20.11.0 version of Node.js is used
git clone <project_url>
cd <project_dir>
npm ci
# copy .env file to .env.local
cp .env .env.local
# get necessary data from `commercetools.com/<project>/settings/developer/api-clients` (or your project manager)
# .env notes
TBD=TBD
# for dev
npm run dev
# for prod
npm run build
npm run start
cmd | Description |
---|---|
npm run dev |
Development Server at 3000 port |
npm run dev:4000 |
Development Server at 4000 port |
npm run build |
Build project |
npm run start |
Project preview |
npm run test |
Launch tests |
npm run ci:lint |
Linting TS *(for lint-staged package only) |
npm run ci:format |
Formatting codebase *(for lint-staged package only) |
npm run ci:stylelint |
Linting css *(for lint-staged package only) |
npm run lint |
Linting TS *(for manual use) |
npm run format |
Formatting codebase *(for manual use) |
npm run stylelint |
Linting css *(for manual use) |
npm run fix |
Combined fix all script |
npm run lint-staged |
Script for staged files only linter/formatter checks |
npm run commitlint |
Linting commit messages *(for husky only) |
npm run prepare |
Script for Husky package init |