diff --git a/apps/website/index.d.ts b/apps/website/index.d.ts new file mode 100644 index 00000000..3e1bef28 --- /dev/null +++ b/apps/website/index.d.ts @@ -0,0 +1,2 @@ +declare module '*.png'; +declare module '*.jpg'; diff --git a/apps/website/next.config.js b/apps/website/next.config.js index f23b112f..c91e62fe 100644 --- a/apps/website/next.config.js +++ b/apps/website/next.config.js @@ -25,6 +25,11 @@ module.exports = { destination: 'https://guilded.gg/guildedts', permanent: false, }, + { + source: '/npm', + destination: 'https://npmjs.com/package/guilded.ts', + permanent: false, + }, ]; }, }; diff --git a/apps/website/package.json b/apps/website/package.json index 60ea1c47..4a1a6ed4 100644 --- a/apps/website/package.json +++ b/apps/website/package.json @@ -19,18 +19,20 @@ "lint": "next lint" }, "dependencies": { - "next": "^13.0.0", + "next": "^13.1.6", "react": "^18.2.0", "react-dom": "^18.2.0", - "react-icons": "^4.6.0" + "react-icons": "^4.7.1", + "react-syntax-highlighter": "^15.5.0" }, "devDependencies": { - "@types/react": "18.0.27", - "@types/react-dom": "^18.0.7", - "autoprefixer": "^10.4.12", - "eslint-config-next": "^13.0.0", - "postcss": "^8.4.18", - "tailwindcss": "^3.2.1", - "typescript": "^4.8.4" + "@types/react": "18.0.28", + "@types/react-dom": "^18.0.11", + "@types/react-syntax-highlighter": "^15.5.6", + "autoprefixer": "^10.4.13", + "eslint-config-next": "^13.1.6", + "postcss": "^8.4.21", + "tailwindcss": "^3.2.7", + "typescript": "^4.9.5" } } diff --git a/apps/website/src/app/layout.tsx b/apps/website/src/app/layout.tsx index 29f5ca90..7ecff950 100644 --- a/apps/website/src/app/layout.tsx +++ b/apps/website/src/app/layout.tsx @@ -8,7 +8,7 @@ export default function Layout({ children }: React.PropsWithChildren) {
-
{children}
+
{children}
diff --git a/apps/website/src/app/page.tsx b/apps/website/src/app/page.tsx index 8ca80872..c756ea83 100644 --- a/apps/website/src/app/page.tsx +++ b/apps/website/src/app/page.tsx @@ -1,24 +1,49 @@ import Image from 'next/image'; + import Command from 'components/Command'; import ExternalLink from 'components/ExternalLink'; +import Syntax from 'components/Syntax'; +import Layout from 'components/Layout'; + +const codeString = `import Client from "guilded.ts"; + +const client = new Client({ token: "your-super-secret-token" }); + +client.once("ready", () => console.log("Logged in!")); + +client.on("messageCreate", (message) => { + if (message.content === "!ping") { + return message.reply("Pong!") + } +}); + +client.login();`; export default function Page() { return ( -
+
- Guilded.TS + Guilded.TS npm install guilded.ts
-
-

About

+
+

About

Guilded.TS is a feature rich, fast and efficient Guilded API wrapper. Its main goal is to be simple and easy to use. It is also inspired by{' '} discord.js to make it - possible for users familier with it to create Guilded bots with as much ease as + possible for users familiar with it to create Guilded bots with as much ease as possible.

+
); } diff --git a/apps/website/src/components/Command.tsx b/apps/website/src/components/Command.tsx index 09aae152..bb66b447 100644 --- a/apps/website/src/components/Command.tsx +++ b/apps/website/src/components/Command.tsx @@ -13,15 +13,20 @@ export default function Command({ children }: { children: string }) { } return ( - + {children} - + {copied ? ( + + ) : ( + + )} ); } diff --git a/apps/website/src/components/Footer.tsx b/apps/website/src/components/Footer.tsx index 74b064a6..11b54429 100644 --- a/apps/website/src/components/Footer.tsx +++ b/apps/website/src/components/Footer.tsx @@ -1,13 +1,16 @@ import Link from 'next/link'; + import IconLinks from './IconLinks'; export default function Footer() { return ( -