Skip to content

Commit 0409969

Browse files
committed
fix(docs): fix api docs pages, add plugin pub date
1 parent 43c6c21 commit 0409969

File tree

17 files changed

+171
-147
lines changed

17 files changed

+171
-147
lines changed

apps/docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"lint": "next lint",
1111
"vercel-build": "prisma generate && next build",
1212
"prisma:generate": "prisma generate",
13-
"docgen": "rm -rf src/pages/docs && node src/utils/docgen.mjs && node src/utils/docgen.mjs"
13+
"docgen": "rm -rf src/pages/docs/api && node src/utils/docgen.mjs && node src/utils/docgen.mjs"
1414
},
1515
"author": "DuroCodes",
1616
"license": "MIT",

apps/docs/src/components/Plugin.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ interface PluginProps {
1212
name: string;
1313
id: string;
1414
author: Author;
15+
createdAt: Date;
1516
}
1617

1718
export function PluginCard({ plugin }: { plugin: PluginProps; }) {
@@ -29,7 +30,13 @@ export function PluginCard({ plugin }: { plugin: PluginProps; }) {
2930
objectFit="cover"
3031
/>
3132
</div>
32-
{plugin.author.name}
33+
{plugin.author.name}{
34+
plugin.createdAt.toLocaleDateString('en-us', {
35+
year: 'numeric',
36+
month: 'short',
37+
day: 'numeric',
38+
})
39+
}
3340
</div>
3441
<style jsx global>{`
3542
html.dark .icon-circle {

apps/docs/src/pages/docs/classes/@spark.ts/handler/SparkClient.mdx renamed to apps/docs/src/pages/docs/classes/SparkClient.mdx

Lines changed: 39 additions & 73 deletions
Large diffs are not rendered by default.

apps/docs/src/pages/docs/classes/@spark.ts/handler/SparkCommand.mdx renamed to apps/docs/src/pages/docs/classes/SparkCommand.mdx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
title: SparkCommand
3+
---
4+
15
## SparkCommand implements BaseCommand
26

37
The event class. Use this class to create new commands in your bot.
@@ -16,18 +20,18 @@ new SparkCommand(options)
1620

1721
The description of the command. Will default to
1822

19-
- [Source](https://github.com/DuroCodes/spark/blob/d7098ec/packages/handler/src/structures/sparkCommand.ts#L42)
23+
- [Source](https://github.com/DuroCodes/spark/blob/43c6c21/packages/handler/src/structures/sparkCommand.ts#L42)
2024

2125
### public name: string
2226

2327
The name of the command. Will default to the file's name without the shortcut.
2428
Example:
2529

26-
- [Source](https://github.com/DuroCodes/spark/blob/d7098ec/packages/handler/src/structures/sparkCommand.ts#L37)
30+
- [Source](https://github.com/DuroCodes/spark/blob/43c6c21/packages/handler/src/structures/sparkCommand.ts#L37)
2731

2832
### public type: CommandType
2933

3034
The type of the command.
3135
You can use the
3236

33-
- [Source](https://github.com/DuroCodes/spark/blob/d7098ec/packages/handler/src/structures/sparkCommand.ts#L48)
37+
- [Source](https://github.com/DuroCodes/spark/blob/43c6c21/packages/handler/src/structures/sparkCommand.ts#L48)

apps/docs/src/pages/docs/classes/@spark.ts/handler/SparkEvent.mdx renamed to apps/docs/src/pages/docs/classes/SparkEvent.mdx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
title: SparkEvent
3+
---
4+
15
## SparkEvent implements EventOptions\<Key>
26

37
The event class. Use this class to create new events in your bot.
@@ -16,16 +20,16 @@ new SparkEvent(options)
1620

1721
The name of the event. (Such as
1822

19-
- [Source](https://github.com/DuroCodes/spark/blob/d7098ec/packages/handler/src/structures/sparkEvent.ts#L37)
23+
- [Source](https://github.com/DuroCodes/spark/blob/43c6c21/packages/handler/src/structures/sparkEvent.ts#L37)
2024

2125
### public once: boolean
2226

2327
Whether the event should run once.
2428

25-
- [Source](https://github.com/DuroCodes/spark/blob/d7098ec/packages/handler/src/structures/sparkEvent.ts#L47)
29+
- [Source](https://github.com/DuroCodes/spark/blob/43c6c21/packages/handler/src/structures/sparkEvent.ts#L47)
2630

2731
### public run: EventRunner\<Key>
2832

2933
The run function for the event.
3034

31-
- [Source](https://github.com/DuroCodes/spark/blob/d7098ec/packages/handler/src/structures/sparkEvent.ts#L42)
35+
- [Source](https://github.com/DuroCodes/spark/blob/43c6c21/packages/handler/src/structures/sparkEvent.ts#L42)

apps/docs/src/pages/docs/types/@spark.ts/handler/Command.mdx

Lines changed: 0 additions & 3 deletions
This file was deleted.

apps/docs/src/pages/docs/types/@spark.ts/handler/EventRunner.mdx

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: Command
3+
---
4+
5+
## Command
6+
7+
- [Source](https://github.com/DuroCodes/spark/blob/43c6c21/packages/handler/src/types/command.ts#L107)

apps/docs/src/pages/docs/types/@spark.ts/handler/CommandPlugin.mdx renamed to apps/docs/src/pages/docs/types/CommandPlugin.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
title: CommandPlugin
3+
---
4+
15
## CommandPlugin
26

37
Represents a plugin that is ran upon the command being used.
@@ -9,4 +13,4 @@ Good for guards, reusability.
913
| name | string | N/A | - |
1014
| run | (options: CommandPluginOptionsDefs\[T]) => Awaitable\<Result\<void, void>> | N/A | - |
1115

12-
- [Source](https://github.com/DuroCodes/spark/blob/d7098ec/packages/handler/src/types/plugin.ts#L87)
16+
- [Source](https://github.com/DuroCodes/spark/blob/43c6c21/packages/handler/src/types/plugin.ts#L87)

apps/docs/src/pages/docs/types/@spark.ts/handler/CommandType.mdx renamed to apps/docs/src/pages/docs/types/CommandType.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
title: CommandType
3+
---
4+
15
## CommandType
26

37
| Property | Type | Value | Description |
@@ -6,4 +10,4 @@
610
| Slash | 'slash' | N/A | - |
711
| Text | 'text' | N/A | - |
812

9-
- [Source](https://github.com/DuroCodes/spark/blob/d7098ec/packages/handler/src/types/command.ts#L15)
13+
- [Source](https://github.com/DuroCodes/spark/blob/43c6c21/packages/handler/src/types/command.ts#L15)

0 commit comments

Comments
 (0)