Skip to content

Commit 31fcaef

Browse files
committed
replace pnpm with yarn in docs and github actions
1 parent a8a1c6e commit 31fcaef

File tree

16 files changed

+45
-45
lines changed

16 files changed

+45
-45
lines changed

.github/workflows/github-actions.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,22 @@ jobs:
1919
uses: actions/setup-node@v4
2020
with:
2121
node-version: ${{ matrix.node-version }}
22-
cache: 'pnpm'
22+
cache: 'yarn'
2323

2424
- name: Install dependencies
25-
run: pnpm
25+
run: yarn
2626

2727
- name: Build @core/lib
28-
run: pnpm lib:build
28+
run: yarn lib:build
2929

3030
- name: Build express-server
31-
run: pnpm workspace express-server build
31+
run: yarn workspace express-server build
3232

3333
- name: Build nestjs-server
34-
run: pnpm workspace nestjs-server build
34+
run: yarn workspace nestjs-server build
3535

3636
- name: Build react-client
37-
run: pnpm workspace react-client build
37+
run: yarn workspace react-client build
3838

3939
- name: Build next-client
40-
run: pnpm workspace next-client build
40+
run: yarn workspace next-client build

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ You can clone the full repo and keep only the packages you need in your monorepo
1616

1717
## Get Started
1818

19-
This package uses [pnpm](https://pnpm.io/) as the workspace `packageManager`.
19+
This package uses [yarn](https://yarnpkg.com/) as the workspace `packageManager`.
2020

2121
```
22-
npm install -g pnpm
22+
npm install -g yarn
2323
```
2424

2525
Place the shared packages in the `packages` folder & the applications code in the `apps` folder.
@@ -28,14 +28,14 @@ If you do not wish to use Turborepo, delete `turbo.json` and remove it from `dev
2828
Install `node_modules`
2929

3030
```
31-
pnpm install
31+
yarn install
3232
```
3333

3434
Add relavant scripts in the root package.json for the frontend and backend apps of your choice.
3535

3636
Run specific commands,
3737
```
38-
pnpm --filter <workspace> run <command>
38+
yarn <workspace> run <command>
3939
```
4040

4141
Build, run, lint or test all your apps in one command thanks to [Turborepo's Pipelines](https://turborepo.org/docs/core-concepts/pipelines)

apps/express-server/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM node:20-alpine3.18 AS phase1
33

44
WORKDIR /app
55

6-
# Run pnpm only if package.json changes
6+
# Run yarn only if package.json changes
77
# copied tsconfig as express-server's tsconfig extends rootDir's tsconfig
88
COPY --chown=node:node turbo.json .
99
COPY --chown=node:node tsconfig.json .
@@ -17,10 +17,10 @@ COPY --chown=node:node ./apps/express-server/package.json apps/express-server
1717
COPY --chown=node:node ./apps/express-server apps/express-server
1818

1919
# install node_modules
20-
RUN pnpm
20+
RUN yarn
2121

2222
# build express-server
23-
RUN pnpm build
23+
RUN yarn build
2424

2525
# run server in dev env
26-
CMD ["pnpm", "workspace", "express-server", "start"]
26+
CMD ["yarn", "workspace", "express-server", "start"]

apps/express-server/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ Express JS Application with Typescript
66

77
In dev mode,
88
```bash
9-
pnpm dev
9+
yarn dev
1010
```
1111

1212
Build the app and run production code
1313
```bash
14-
pnpm prod
14+
yarn prod
1515
```
1616

1717
### Features

apps/express-server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"dev": "nodemon --exec 'ts-node -r tsconfig-paths/register src/index.ts'",
88
"build": "rimraf dist && tsc && tsc-alias",
99
"start": "node dist/index.js",
10-
"prod": "pnpm build && pnpm start",
10+
"prod": "yarn build && yarn start",
1111
"lint": "eslint --fix ."
1212
},
1313
"dependencies": {

apps/nestjs-server/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM node:20-alpine3.18 as phase1
33

44
WORKDIR /app
55

6-
# Run pnpm only if package.json changes
6+
# Run yarn only if package.json changes
77
# copied tsconfig as nestjs-server's tsconfig extends rootDir's tsconfig
88
COPY --chown=node:node turbo.json .
99
COPY --chown=node:node tsconfig.json .
@@ -18,7 +18,7 @@ COPY --chown=node:node ./apps/nestjs-server/package.json apps/nestjs-server
1818
COPY --chown=node:node ./apps/nestjs-server apps/nestjs-server
1919

2020
# install node_modules
21-
RUN pnpm
21+
RUN yarn
2222

2323
# run server in prod env
24-
CMD ["pnpm", "workspace", "nestjs-server", "prod"]
24+
CMD ["yarn", "workspace", "nestjs-server", "prod"]

apps/nestjs-server/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,21 @@
1111

1212
```bash
1313
# development
14-
$ pnpm run dev
14+
$ yarn run dev
1515

1616
# build & run in production mode
17-
$ pnpm run prod
17+
$ yarn run prod
1818
```
1919

2020
## Test
2121

2222
```bash
2323
# unit tests
24-
$ pnpm run test
24+
$ yarn run test
2525

2626
# e2e tests
27-
$ pnpm run test:e2e
27+
$ yarn run test:e2e
2828

2929
# test coverage
30-
$ pnpm run test:cov
30+
$ yarn run test:cov
3131
```

apps/nestjs-server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"build": "nest build",
1010
"start": "NODE_ENV=production node dist/main",
1111
"start:debug": "nest start --debug --watch",
12-
"prod": "pnpm run build && pnpm run start",
12+
"prod": "yarn run build && yarn run start",
1313
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
1414
"test": "jest",
1515
"test:watch": "jest --watch",

apps/next-client/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ WORKDIR /app
1111
RUN mkdir -p apps/next-client
1212

1313
COPY --chown=node:node package.json .
14-
COPY --chown=node:node pnpm-lock.yaml .
14+
COPY --chown=node:node yarn-lock.yaml .
1515
COPY --chown=node:node ./apps/next-client/package.json ./apps/next-client
1616

1717
# Install dependencies
18-
RUN pnpm --frozen-lockfile
18+
RUN yarn --frozen-lockfile
1919

2020
# Copy the rest of the application code to the container
2121
COPY ./apps/next-client ./apps/next-client
@@ -26,9 +26,9 @@ COPY ./apps/next-client ./apps/next-client
2626
# ENV NEXT_TELEMETRY_DISABLED 1
2727

2828
# Build the Next.js app
29-
RUN pnpm workspace next-client build
29+
RUN yarn workspace next-client build
3030

3131
# Expose the port Next.js app runs on (default is 3000)
3232
EXPOSE 3000
3333

34-
CMD [ "pnpm", "workspace", "next-client", "start" ]
34+
CMD [ "yarn", "workspace", "next-client", "start" ]

apps/next-client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"dev": "next dev -p 3001",
88
"build": "next build",
99
"start": "next start",
10-
"prod": "pnpm run build && pnpm run start",
10+
"prod": "yarn run build && yarn run start",
1111
"lint": "next lint --fix ."
1212
},
1313
"dependencies": {

0 commit comments

Comments
 (0)