Skip to content

Commit 22a5a93

Browse files
await-ovogregberge
authored andcommitted
chore: use pnpm instead npm
1 parent be5d3a8 commit 22a5a93

File tree

30 files changed

+16615
-2035
lines changed

30 files changed

+16615
-2035
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,20 @@ jobs:
2525
- name: Use Node.js ${{ matrix.node-version }}
2626
uses: actions/setup-node@v3
2727

28-
- name: Use latest npm
29-
run: npm i -g npm@latest --registry=https://registry.npmjs.org
30-
if: ${{ matrix.node-version == '14.x' }}
28+
- name: Use latest pnpm
29+
run: npm i -g pnpm@latest --registry=https://registry.npmjs.org
3130

3231
- name: Install dependencies
33-
run: npm ci
32+
run: pnpm install
3433

3534
- name: Build
36-
run: npm run build
35+
run: pnpm run build
3736

3837
- name: Lint
39-
run: npm run lint
38+
run: pnpm run lint
4039

4140
- name: Test
42-
run: npm run test -- --ci --coverage
41+
run: pnpm run test --ci --coverage
4342

4443
- name: Codecov
4544
run: npx codecov

.prettierignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ lerna.json
66
dist/
77
.next/
88
/website/.cache/
9-
/website/public/
9+
/website/public/
10+
pnpm-workspace.yaml
11+
pnpm-lock.yaml

CONTRIBUTING.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,16 @@ We expect project participants to adhere to our Code of Conduct. Please read [th
1010

1111
All work on SVGR happens directly on [GitHub](/). Both core team members and external contributors send pull requests which go through the same review process.
1212

13+
The SVGR repo is a monorepo using pnpm workspaces and [Lerna](https://lerna.js.org/docs/recipes/using-pnpm-with-lerna). The package manager used to install and link dependencies must be [pnpm](https://pnpm.io/). Note that website still uses npm, as there are some errors reported when using pnpm in gatsby.
14+
1315
### Online one click Setup
1416

1517
You can use Gitpod(An Online Open Source VS Code like IDE which is free for Open Source) for contributing online. With a single click it will start a workspace and automatically:
1618

1719
- clone the `svgr` repo.
18-
- install all the dependencies in `/` and `/website`.
19-
- run `npm run dev` in `/`.
20+
- install dependencies in '/': `pnpm install`
21+
- install dependencies in '/website': `npm install`
22+
- run `pnpm run dev` in `/`.
2023
- run `npm run dev` in `/website` to start the dev server.
2124

2225
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/from-referrer/)
@@ -37,27 +40,27 @@ _Before_ submitting a pull request, please make sure the following is done…
3740

3841
Note: Replace `<your_username>` with your GitHub username
3942

40-
2. Run `npm install` and `npm run build`.
43+
2. Run `pnpm install` and `pnpm run build`.
4144

4245
3. If you've added code that should be tested, add tests. You can use watch mode that continuously transforms changed files to make your life easier.
4346

4447
```sh
4548
# in the background
46-
npm run dev
49+
pnpm run dev
4750
```
4851

4952
4. If you've changed APIs, update the documentation.
5053

5154
5. Ensure the linting is good via `npm run lint`.
5255

5356
```sh-session
54-
$ npm run lint
57+
$ pnpm run lint
5558
```
5659

5760
6. Ensure the test suite passes via `npm run test`.
5861

5962
```sh-session
60-
$ npm run test
63+
$ pnpm run test
6164
```
6265

6366
## Bugs

0 commit comments

Comments
 (0)