You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: .github/CONTRIBUTING.md
+10-11
Original file line number
Diff line number
Diff line change
@@ -11,37 +11,36 @@ is a great boon to your development process.
11
11
To get ready to work on the codebase, please do the following:
12
12
13
13
1. Fork & clone the repository, and make sure you're on the **main** branch
14
-
2. Run `yarn --immutable` ([install](https://yarnpkg.com/getting-started/install))
15
-
3. Run `yarn build` to build local packages
14
+
2. Run `pnpm install --frozen-lockfile` ([install](https://pnpm.io/installation))
15
+
3. Run `pnpm run build` to build local packages
16
16
4. Code your heart out!
17
-
5. Run `yarn test` to run ESLint and ensure any JSDoc changes are valid
17
+
5. Run `pnpm run test` to run ESLint and ensure any JSDoc changes are valid
18
18
6.[Submit a pull request](https://github.com/discordjs/discord.js/compare) (Make sure you follow the [conventional commit format](https://github.com/discordjs/discord.js/blob/main/.github/COMMIT_CONVENTION.md))
19
19
20
20
## Testing changes locally
21
21
22
-
If you want to test changes you've made locally, you can do so by using `yarn link`. This will create a symlink to your local copy of the discord.js libraries.
22
+
If you want to test changes you've made locally, you can do so by using `pnpm link <package-you-want-to-link-to-your-current-package>`. This will create a symlink to your local copy of the discord.js libraries.
23
23
24
24
1. Create a new directory `mkdir discordjs-test` and move into it `cd discordjs-test`
25
-
2. Initialize a new yarn 3 project `yarn init -2`
26
-
3. Disable pnp `yarn config set nodeLinker node-modules`
27
-
4. Now link the local discord.js project you cloned earlier `yarn link -A {PATH_TO_DISCORDJS_REPO}`
28
-
5. Install packages you'd like to test locally `yarn add discord.js@latest`, `yarn add @discordjs/rest@latest`, etc. **Note: Make sure you use `latest` tag or else yarn will try to install the remote package from npm**
29
-
6. Import the package in your source code and test them out!
25
+
2. Initialize a new pnpm project `pnpm init`
26
+
3. Now link the local discord.js project you cloned earlier `pnpm link {PATH_TO_DISCORDJS_REPO}`
27
+
4. Install packages you'd like to test locally `pnpm add discord.js@latest`, `pnpm add @discordjs/rest@latest`, etc. **Note: Make sure you use `latest` tag or else pnpm will try to install the remote package from npm**
28
+
5. Import the package in your source code and test them out!
30
29
31
30
### Working with TypeScript packages
32
31
33
32
When testing local changes, you may notice you need to manually recompile TypeScript projects on every change in order to get the latest code changes to test locally.
34
33
35
34
To avoid this you can use the `--watch` parameter in the package build script to automatically recompile the project when changes are detected.
36
35
37
-
For example, to automatically recompile the `@discordjs/rest` project when changes are detected, run `yarn turbo run build --filter=@discordjs/rest --concurrency=3 -- --watch` in the root folder of where you cloned the discord.js repo.
36
+
For example, to automatically recompile the `@discordjs/rest` project when changes are detected, run `pnpm turbo run build --filter='@discordjs/rest' -- --watch` in the root folder of where you cloned the discord.js repo.
38
37
39
38
## Adding new packages
40
39
41
40
If you'd like to create another package under the `@discordjs` organization run the following command:
0 commit comments