Skip to content

Commit 5d918f3

Browse files
committed
Basic wording/link pass (thanks WebStorm)
1 parent f5c88cb commit 5d918f3

12 files changed

+27
-23
lines changed

Diff for: .gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,13 @@ yarn-debug.log*
1212
yarn-error.log*
1313
pnpm-debug.log*
1414

15-
1615
# environment variables
1716
.env
1817
.env.production
1918

2019
# macOS-specific files
2120
.DS_Store
21+
22+
# shut up
23+
/.vscode
24+
/.idea

Diff for: src/content/docs/blog/moonlight-api-v2.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ authors: [notnite, cynosphere, adryd]
77

88
Been a while, eh? The last post we wrote for moonlight was [when we first introduced it](/blog/reintroducing-moonlight). Sounds like it's time to change that!
99

10-
moonlight development was stalled for a while this year, particularly due to lack of motivation. Less people than expected tinkering with moonlight gave us less reason to update it, and so it fell behind with Discord updates, eventually breaking catastrophically for several months. Thanks to [redstonekasi](https://github.com/redstonekasi) for submitting pull requests for fixing a *lot* of things while none of us had the energy to.
10+
moonlight development was stalled for a while this year, particularly due to lack of motivation. Fewer people than expected tinkering with moonlight gave us less reason to update it, and so it fell behind with Discord updates, eventually breaking catastrophically for several months. Thanks to [redstonekasi](https://github.com/redstonekasi) for submitting pull requests for fixing a *lot* of things while none of us had the energy to.
1111

1212
About a week ago, [Ari](https://github.com/adryd325) had the idea of making a centralized repository for Discord client mappings. This short conversation would lead to one of the greatest nerdsnipes in moonlight history.
1313

Diff for: src/content/docs/dev/helper-scripts.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ sidebar:
44
order: 3
55
---
66

7-
Inside of the moonlight repository, there is a `scripts` folder with some tools in it.
7+
Inside the moonlight repository, there is a `scripts` folder with some tools in it.
88

99
## update.js
1010

Diff for: src/content/docs/dev/mappings.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ moonlight.moonmap.addExport("discord/components/common/index", "AIconButRenamed"
1818
});
1919
```
2020

21-
If you're registering your own module, you'll need to find the Webpack module ID. You can do this in a Webpack module using [Spacepack](/ext-dev/api/#spacepack):
21+
If you're registering your own module, you'll need to find the Webpack module ID. You can do this in a Webpack module using [Spacepack](/ext-dev/api#spacepack):
2222

2323
```ts
2424
moonlight.moonmap.addModule(spacepack.findByCode(/* ... */)[0].id, "discord/my/custom/module");

Diff for: src/content/docs/dev/setup.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,18 @@ You will need [pnpm](https://pnpm.io), as moonlight uses it for dependency and w
2424

2525
## Project structure
2626

27-
moonlight is split into a [pnpm workspace](https://pnpm.io/workspaces). The project is comprised of multiple packages:
27+
moonlight is split into a [pnpm workspace](https://pnpm.io/workspaces). The project contains multiple packages:
2828

2929
- `core`: core code and utilities responsible for loading extensions
3030
- `injector`: the entrypoint for moonlight loaded by the patched Discord client
3131
- loads the config and detected extensions from disk and forwards them to the other stages
3232
- loads host modules
33-
- sets up `node-preload` to be ran when the browser window is created
33+
- sets up `node-preload` to run when the browser window is created
3434
- `node-preload`: ran before Discord's code on the Node side
3535
- receives the config/detected extensions from `injector` and forwards it to `web-preload`
3636
- loads node modules
37-
- loads `web-preload` and forwards some inforation to it
37+
- loads `web-preload` and forwards some information to it
38+
- starts Discord once everything is ready
3839
- `web-preload`: ran before Discord's code on the web side
3940
- receives the loaded config and detected extensions from `node-preload`
4041
- loads extensions and installs their Webpack modules and patches

Diff for: src/content/docs/ext-dev/api.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The global types are available [here](https://github.com/moonlight-mod/moonlight
1515

1616
## Extension libraries
1717

18-
Remember to [add the module as a dependency](/ext-dev/webpack/#webpack-module-dependencies).
18+
Remember to [add the module as a dependency](/ext-dev/webpack#webpack-module-dependencies).
1919

2020
### Context Menu
2121

Diff for: src/content/docs/ext-dev/cookbook.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Remember to [restart the dev server](/ext-dev/pitfalls#restarting-dev-mode-is-re
5555

5656
Mark the extension as a dependency of your extension:
5757

58-
```ts title="manifest.json"
58+
```json title="manifest.json"
5959
{
6060
"dependencies": ["markdown"]
6161
}
@@ -112,13 +112,13 @@ export default function MyElement() {
112112
}
113113
```
114114

115-
React [must be imported when using JSX](/ext-dev/pitfalls/#using-jsx).
115+
React [must be imported when using JSX](/ext-dev/pitfalls#using-jsx).
116116

117117
## Using Spacepack to find code dynamically
118118

119119
```ts
120120
import spacepack from "@moonlight-mod/wp/spacepack_spacepack";
121-
const { something } = spacepack.findByCode(...)[0].exports;
121+
const { something } = spacepack.findByCode(/* ... */)[0].exports;
122122
```
123123

124124
Remember to add your find to [your extension dependencies](/ext-dev/webpack#webpack-module-insertion) and [declare Spacepack as a dependency](#using-another-extension-as-a-library).

Diff for: src/content/docs/ext-dev/devtools.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ To see the source of a module, print the function with `spacepack.inspect`:
2525
spacepack.inspect(/* module ID */)
2626
```
2727

28-
The returned value will be a function you can double click to see the module source.
28+
The returned value will be a function you can double-click to see the module source.
2929

3030
You can chain `inspect` with `findByCode` (or an equivalent) when trying to find the source of a patch in a rush:
3131

Diff for: src/content/docs/ext-dev/official-repository.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ Then, create a pull request to [the official repository][extensions], adding a m
3333
To prevent extensions from going unmaintained on the official repository, an adoption policy is in place for other developers to take over ownership of an extension. You can adopt an extension in one of the following scenarios:
3434

3535
- You have written consent from a developer to adopt it
36-
- The extension has been outdated for over 3 months, and the developer did not respond after contact after 7 days
36+
- The extension has been outdated for over 3 months, and the developer did not respond to contact after 7 days
3737

38-
An extension is defined as "outdated" when its features do not work, the extension crashes the client, or it has not been updated for the latest [API level](/ext-dev/migrating-api-levels/). We encourage developers to reach out for permission in a public space, like GitHub issues or in the moonlight Discord server, so that the response can be verified.
38+
An extension is defined as "outdated" when its features do not work, the extension crashes the client, or it has not been updated for the latest [API level](/ext-dev/migrating-api-levels). We encourage developers to reach out for permission in a public space, like GitHub issues or in the moonlight Discord server, so that the response can be verified.
3939

4040
[extensions]: <https://github.com/moonlight-mod/extensions>
4141

@@ -47,7 +47,7 @@ Extensions that violate the following rules cannot be submitted to the official
4747
- Examples: animated custom statuses, rainbow roles, scheduled messages, automatic message responses (like a bot would to a command), mass deleting messages
4848
- Respect the privacy of other users. No logging of other users' actions or long-term scraping of the Discord API.
4949
- Examples: message loggers/"anti delete", message archival, read states via "hidden pixel" tracking
50-
- Respect the privacy of the user. Interactions with third party services must be clearly denoted inside of the plugin tagline or description.
50+
- Respect the privacy of the user. Interactions with third party services must be clearly denoted inside the extension tagline or description.
5151
- Examples: HTTP APIs
5252

5353
If you're unsure if your extension can be submitted or not, feel free to ask!

Diff for: src/content/docs/ext-dev/pitfalls.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,21 @@ sidebar:
77

88
## Web vs Node.js
99

10-
Node.js code cannot be imported directly from the web side. You must use `moonlight.getNatives`. See [the cookbook](/ext-dev/cookbook/#sharing-code-between-nodejs-and-the-web) for how to access Node.js exports.
10+
Node.js code cannot be imported directly from the web side. You must use `moonlight.getNatives`. See [the cookbook](/ext-dev/cookbook#sharing-code-between-nodejs-and-the-web) for how to access Node.js exports.
1111

1212
## Webpack require is not Node.js require
1313

1414
The `require` function used in Webpack modules and patches is not the same as the function in Node.js. Instead, it lets you require other Webpack modules by their IDs.
1515

16-
If you have a Webpack module you want to load, [you can require it by its ID](/ext-dev/webpack/#importing-other-webpack-modules).
16+
If you have a Webpack module you want to load, [you can require it by its ID](/ext-dev/webpack#importing-other-webpack-modules).
1717

1818
## The web entrypoint is not a Webpack module
1919

20-
You cannot use Webpack modules inside of `index.ts`, because it is loaded before Webpack is initialized. Instead, [create your own Webpack module](/ext-dev/webpack/#webpack-module-insertion) and use that.
20+
You cannot use Webpack modules inside of `index.ts`, because it is loaded before Webpack is initialized. Instead, [create your own Webpack module](/ext-dev/webpack#webpack-module-insertion) and use that.
2121

2222
## Webpack modules only load when required
2323

24-
By default, Webpack modules will not load unless they are required by another module or the `entrypoint` flag is set. If you need a module to run as soon as possible, [set the entrypoint flag](/ext-dev/webpack/#webpack-module-insertion).
24+
By default, Webpack modules will not load unless they are required by another module or the `entrypoint` flag is set. If you need a module to run as soon as possible, [set the entrypoint flag](/ext-dev/webpack#webpack-module-insertion).
2525

2626
## Spacepack findByCode matching itself
2727

@@ -76,7 +76,7 @@ import { someState } from "@moonlight-mod/wp/yourExtension_someModule";
7676
const { someState } = require("yourExtension_someModule");
7777
```
7878

79-
Remember to [type your module](/ext-dev/webpack/#importing-other-webpack-modules) when using import statements.
79+
Remember to [type your module](/ext-dev/webpack#importing-other-webpack-modules) when using import statements.
8080

8181
## Restarting dev mode is required in some scenarios
8282

Diff for: src/content/docs/ext-dev/webpack.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ You can specify:
160160

161161
- Extension IDs and Webpack module names (e.g. `{ ext: "common", id: "stores" }`)
162162
- Use this if you're using [an extension library](/ext-dev/api).
163-
- Make sure to [mark the extension as a dependency](/ext-dev/cookbook/#using-another-extension-as-a-library) in your extension manifest.
163+
- Make sure to [mark the extension as a dependency](/ext-dev/cookbook#using-another-extension-as-a-library) in your extension manifest.
164164
- Webpack module names (e.g. `{ id: "discord/Dispatcher" }`)
165165
- Use this if you're using [mappings](/ext-dev/mappings).
166166
- Strings and regexes to match against other modules
@@ -206,7 +206,7 @@ Remember to [add the module as a dependency](#webpack-module-dependencies).
206206

207207
## Common patterns
208208

209-
You will see familiar things when [reading Discord Webpack modules](/ext-dev/devtools/#reading-module-sources):
209+
You will see familiar things when [reading Discord Webpack modules](/ext-dev/devtools#reading-module-sources):
210210

211211
- The pattern `n(/* some number */)` represents a require, and is another module ID inside of the argument. You can pass that module ID to `spacepack.inspect` to read the required module source.
212212
- `Z` and `ZP` usually correspond to `default` exports.

Diff for: src/content/docs/using/why-moonlight.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ A common question we get is what moonlight does differently, and why it's worth
2525
Modify any piece of code you want using regex or ASTs, or add your own code as a Webpack module
2626
</Card>
2727
<Card title="Open extension system" icon="puzzle">
28-
[Develop extensions locally](/ext-dev/getting-started/#build-and-run-the-extension) or [make a third party repository](/ext-dev/getting-started/#publishing-to-github-pages), no recompiling moonlight required
28+
[Develop extensions locally](/ext-dev/getting-started#build-and-run-the-extension) or [make a third party repository](/ext-dev/getting-started#publishing-to-github-pages), no recompiling moonlight required
2929
</Card>
3030
<Card title="Community-made mappings" icon="seti:code-search">
3131
[Community-maintained mappings of the Discord client](https://github.com/moonlight-mod/mappings), available as a library

0 commit comments

Comments
 (0)