Skip to content

Commit 6ff5cd9

Browse files
docs: improve and reference contributing documentation (#1115)
1 parent e53eb19 commit 6ff5cd9

File tree

2 files changed

+27
-23
lines changed

2 files changed

+27
-23
lines changed

CONTRIBUTING.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ Other package managers may work but are not officially supported for development
55

66
To set up the repository, run:
77

8-
```bash
9-
yarn
10-
yarn build
8+
```sh
9+
$ yarn
10+
$ yarn build
1111
```
1212

1313
This will install all the required dependencies and build output files to `dist/`.
@@ -22,7 +22,7 @@ modify the contents of the `src/lib/` and `examples/` directories.
2222

2323
All files in the `examples/` directory are not modified by the generator and can be freely edited or added to.
2424

25-
```bash
25+
```ts
2626
// add an example to examples/<your-example>.ts
2727

2828
#!/usr/bin/env -S npm run tsn -T
@@ -41,38 +41,38 @@ If you’d like to use the repository from source, you can either install from g
4141

4242
To install via git:
4343

44-
```bash
45-
npm install git+ssh://git@github.com:openai/openai-node.git
44+
```sh
45+
$ npm install git+ssh://git@github.com:openai/openai-node.git
4646
```
4747

4848
Alternatively, to link a local copy of the repo:
4949

50-
```bash
50+
```sh
5151
# Clone
52-
git clone https://www.github.com/openai/openai-node
53-
cd openai-node
52+
$ git clone https://www.github.com/openai/openai-node
53+
$ cd openai-node
5454

5555
# With yarn
56-
yarn link
57-
cd ../my-package
58-
yarn link openai
56+
$ yarn link
57+
$ cd ../my-package
58+
$ yarn link openai
5959

6060
# With pnpm
61-
pnpm link --global
62-
cd ../my-package
63-
pnpm link -—global openai
61+
$ pnpm link --global
62+
$ cd ../my-package
63+
$ pnpm link -—global openai
6464
```
6565

6666
## Running tests
6767

6868
Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests.
6969

70-
```bash
71-
npx prism mock path/to/your/openapi.yml
70+
```sh
71+
$ npx prism mock path/to/your/openapi.yml
7272
```
7373

74-
```bash
75-
yarn run test
74+
```sh
75+
$ yarn run test
7676
```
7777

7878
## Linting and formatting
@@ -82,14 +82,14 @@ This repository uses [prettier](https://www.npmjs.com/package/prettier) and
8282

8383
To lint:
8484

85-
```bash
86-
yarn lint
85+
```sh
86+
$ yarn lint
8787
```
8888

8989
To format and fix all lint issues automatically:
9090

91-
```bash
92-
yarn fix
91+
```sh
92+
$ yarn fix
9393
```
9494

9595
## Publishing and releases

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -650,3 +650,7 @@ The following runtimes are supported:
650650
Note that React Native is not supported at this time.
651651

652652
If you are interested in other runtime environments, please open or upvote an issue on GitHub.
653+
654+
## Contributing
655+
656+
See [the contributing documentation](./CONTRIBUTING.md).

0 commit comments

Comments
 (0)