Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[!Breaking Change]: Migrate package manager to pnpm #575

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,18 @@ pip install -r requirements.txt
Make sure you have Node version 16 or higher.

1. Navigate to the [/frontend](https://github.com/arc53/DocsGPT/tree/main/frontend) folder.
2. Install required packages `husky` and `vite` (ignore if installed).
2. You need to install dependencies using `pnpm`

```bash
npm i -g pnpm // ignore if you already have pnpm on your local machine
```
3. Install required packages `husky` and `vite` (ignore if installed).
```commandline
npm install husky -g
npm install vite -g
pnpm add husky -g
pnpm add vite -g
```
3. Install dependencies by running `npm install --include=dev`.
4. Run the app using `npm run dev`.
4. Install dependencies by running `pnpm i`.
5. Run the app using `pnpm dev`.


## Contributing
Expand Down
4 changes: 2 additions & 2 deletions frontend/.husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

# npm test
# pnpm test
cd frontend
npx lint-staged
pnpm exec lint-staged
4 changes: 2 additions & 2 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ FROM node:20.6.1-bullseye-slim

WORKDIR /app
COPY package*.json ./
RUN npm install
RUN pnpm install
COPY . .

EXPOSE 5173

CMD [ "npm", "run", "dev", "--" , "--host"]
CMD [ "pnpm", "dev", "--" , "--host"]
Loading