Skip to content

Commit

Permalink
refactor: move linked roles to core package
Browse files Browse the repository at this point in the history
  • Loading branch information
apteryxxyz committed Sep 21, 2024
1 parent 2ec9df7 commit 05eaaa9
Show file tree
Hide file tree
Showing 21 changed files with 33 additions and 185 deletions.
5 changes: 5 additions & 0 deletions .changeset/itchy-spiders-grin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@buape/carbon": minor
---

refactor: move linked roles to core package
1 change: 0 additions & 1 deletion apps/rocko/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
},
"dependencies": {
"@buape/carbon": "workspace:*",
"@buape/carbon-linked-roles": "workspace:*",
"@buape/carbon-nodejs": "workspace:*",
"@types/node": "22.5.5"
},
Expand Down
4 changes: 2 additions & 2 deletions apps/rocko/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { dirname } from "node:path"
import { fileURLToPath } from "node:url"
import { Client, ClientMode } from "@buape/carbon"
import { loadCommands, serve } from "@buape/carbon-nodejs"
import {
ApplicationRoleConnectionMetadataType,
LinkedRoles
} from "@buape/carbon-linked-roles"
import { loadCommands, serve } from "@buape/carbon-nodejs"
} from "@buape/carbon/linked-roles"
const __dirname = dirname(fileURLToPath(import.meta.url))

if (
Expand Down
10 changes: 10 additions & 0 deletions packages/carbon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@
"type": "module",
"main": "./dist/src/index.js",
"repository": "github:buape/carbon",
"exports": {
".": {
"types": "./dist/src/index.d.ts",
"import": "./dist/src/index.js"
},
"./*": {
"types": "./dist/src/plugins/*/index.d.ts",
"import": "./dist/src/plugins/*/index.js"
}
},
"scripts": {
"build": "tsc",
"dev": "tsc -w",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Client } from "@buape/carbon"
import type { Client } from "../../classes/Client.js"
import {
ApplicationRoleConnectionMetadataType,
type LinkedRolesOptions
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/carbon/typedoc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://typedoc.org/schema.json",
"extends": ["../../typedoc.json"],
"entryPoints": ["src/index.ts"],
"entryPoints": ["src/index.ts", "src/plugins/*/index.ts"],
"name": "@buape/carbon",
"out": "docs",
"excludeExternals": true,
Expand Down
97 changes: 0 additions & 97 deletions packages/linked-roles/CHANGELOG.md

This file was deleted.

13 changes: 0 additions & 13 deletions packages/linked-roles/README.md

This file was deleted.

23 changes: 0 additions & 23 deletions packages/linked-roles/package.json

This file was deleted.

11 changes: 0 additions & 11 deletions packages/linked-roles/tsconfig.json

This file was deleted.

7 changes: 0 additions & 7 deletions packages/linked-roles/typedoc.json

This file was deleted.

9 changes: 0 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions website/content/carbon/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"...",
"--- Usage ---",
"classes",
"plugins",
"helpful-guides",
"even-more",
"--- API Reference ---",
Expand Down
6 changes: 6 additions & 0 deletions website/content/carbon/plugins/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Plugins
index: true
icon: Cable
---

Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Linked Roles
description: Linked Roles are a handy feature of Discord that allows you to create roles that users have to meet certain criteria in order to claim those roles.
---

Linked Roles are a handy feature of Discord that allows you to create roles that users have to meet certain criteria in order to claim those roles.
Expand All @@ -17,13 +18,13 @@ Then, create a new instance of the `LinkedRoles` class, and pass it your metadat
### Installation

<CommandTabs command="install" args={["@buape/carbon @buape/carbon-linked-roles"]} />
<CommandTabs command="install" args={["@buape/carbon"]} />

### Example

```ts title="src/index.ts"
import { Client } from "@buape/carbon"
import { LinkedRoles } from "@buape/carbon-linked-roles"
import { LinkedRoles } from "@buape/carbon/linked-roles"

const client = new Client({
clientId: "12345678901234567890",
Expand Down
1 change: 1 addition & 0 deletions website/content/carbon/plugins/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "title": "Plugins" }
4 changes: 0 additions & 4 deletions website/content/linked-roles/meta.json

This file was deleted.

14 changes: 1 addition & 13 deletions website/modes.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
import {
Brackets,
Computer,
Link,
type LucideIcon,
Package
} from "lucide-react"
import { Computer, Link, type LucideIcon, Package } from "lucide-react"

export interface Mode {
param: string
Expand All @@ -20,12 +14,6 @@ export const modes: Mode[] = [
description: "@buape/carbon",
icon: Package
},
{
param: "linked-roles",
name: "Linked Roles",
description: "@buape/carbon-linked-roles",
icon: Brackets
},
{
param: "nodejs",
name: "NodeJS",
Expand Down
3 changes: 2 additions & 1 deletion website/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts",
"postcss.config.cjs"
"postcss.config.cjs",
"content/carbon/plugins/index.mdx"
],
"exclude": ["node_modules"]
}

0 comments on commit 05eaaa9

Please sign in to comment.