Installation
Dependencies
-
npm
andnode.js
- Required versions are specified in thepackage.json
file. -
vercel
cli- Installation instructions here -
Environment variables - each of the applications contained in this monorepo require a
.env.local
file in order to run locally. Usevercel env pull
command from each app to populate the.env.local
file automatically.e.g, to pull environment variables for the
web
app:cd apps/web
vercel env pullNOTE: You will need to connect the repo to your Vercel project using
vercel link --repo
if you haven't already.
Installation
All of the steps below should be run from the root level of the repository. In general when working with Turborepo you want to be running npm scripts from the root or you're going to have a bad time.
-
Install dependencies
npm install
-
For whichever app you are trying to run, ensure you have a
.env.local
file properly configured. So if you want to run theweb
e-commerce store, ensure you have a file in this directory/apps/web/
Running Locally
-
The default
dev
task of the repo runs theweb
storefront in dev mode.npm run dev
-
For running the other tasks you can use the Turborepo npm package and apply filters. Examples:
-
Running the docs site:
npx turbo run dev --filter=docs
-
Linting a particular package only:
npx turbo run lint --filter=@hv/commerce
-
Type checking a particular package only:
npx turbo run type-check --filter=@hv/commerce
-