Skip to content

Commit

Permalink
Ref: making those peers optional, only needed for those using TypeScr…
Browse files Browse the repository at this point in the history
…ipt.
  • Loading branch information
RobinTail committed Oct 3, 2024
1 parent 6c1be79 commit 60a5256
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ This project is available as a
[NPM package][npm-url].

```bash
$ npm install node-mocks-http @types/node @types/express --save-dev
$ npm install node-mocks-http --save-dev
$ npm install @types/node @types/express --save-dev # when using TypeScript
```

or

```bash
$ yarn add node-mocks-http @types/node @types/express --dev
$ yarn add node-mocks-http --dev
$ yarn add @types/node @types/express --dev # when using TypeScript
```

After installing the package include the following in your test files:
Expand Down
8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@
"@types/express": "^4.17.21 || ^5.0.0",
"@types/node": "*"
},
"peerDependenciesMeta": {
"@types/express": {
"optional": true
},
"@types/node": {
"optional": true
}
},
"devDependencies": {
"@types/chai": "^4.3.11",
"@types/mocha": "^10.0.6",
Expand Down

0 comments on commit 60a5256

Please sign in to comment.