Skip to content

Commit

Permalink
refactor: docs (#10126)
Browse files Browse the repository at this point in the history
  • Loading branch information
iCrawl authored Feb 29, 2024
1 parent 0f9017e commit 18cce83
Show file tree
Hide file tree
Showing 192 changed files with 8,160 additions and 6,365 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,24 @@ jobs:
package: ${{ steps.extract-tag.outputs.package }}
version: ${{ steps.extract-tag.outputs.semver }}

- name: Upload split documentation to blob storage
if: ${{ env.REF_TYPE == 'tag' && (!inputs.ref || inputs.ref == 'main') }}
env:
BLOB_READ_WRITE_TOKEN: ${{ secrets.BLOB_READ_WRITE_TOKEN }}
uses: ./packages/actions/src/uploadSplitDocumentation
with:
package: ${{ steps.extract-tag.outputs.package }}
version: ${{ steps.extract-tag.outputs.semver }}

- name: Upload split documentation to blob storage
if: ${{ env.REF_TYPE == 'tag' && inputs.ref && inputs.ref != 'main' }}
env:
BLOB_READ_WRITE_TOKEN: ${{ secrets.BLOB_READ_WRITE_TOKEN }}
uses: ./main/packages/actions/src/uploadSplitDocumentation
with:
package: ${{ steps.extract-tag.outputs.package }}
version: ${{ steps.extract-tag.outputs.semver }}

- name: Move docs to correct directory
if: ${{ env.REF_TYPE == 'tag' }}
env:
Expand Down Expand Up @@ -141,6 +159,18 @@ jobs:
BLOB_READ_WRITE_TOKEN: ${{ secrets.BLOB_READ_WRITE_TOKEN }}
uses: ./main/packages/actions/src/uploadDocumentation

- name: Upload split documentation to blob storage
if: ${{ env.REF_TYPE == 'branch' && (!inputs.ref || inputs.ref == 'main') }}
env:
BLOB_READ_WRITE_TOKEN: ${{ secrets.BLOB_READ_WRITE_TOKEN }}
uses: ./packages/actions/src/uploadSplitDocumentation

- name: Upload split documentation to blob storage
if: ${{ env.REF_TYPE == 'branch' && inputs.ref && inputs.ref != 'main' }}
env:
BLOB_READ_WRITE_TOKEN: ${{ secrets.BLOB_READ_WRITE_TOKEN }}
uses: ./main/packages/actions/src/uploadSplitDocumentation

- name: Move docs to correct directory
if: ${{ env.REF_TYPE == 'branch' }}
run: |
Expand Down
1 change: 0 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"eamodio.gitlens",
"christian-kohler.npm-intellisense",
"christian-kohler.path-intellisense",
"antfu.unocss",
"unifiedjs.vscode-mdx"
]
}
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"npm.packageManager": "pnpm",
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true,
"unocss.disable": true,
"deno.enable": false,
"deno.enablePaths": ["./packages/create-discord-bot/template/Deno"],
"deno.lint": false,
Expand Down
24 changes: 12 additions & 12 deletions apps/guide/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
"@code-hike/mdx": "^0.9.0",
"@discordjs/ui": "workspace:^",
"@react-icons/all-files": "^4.1.0",
"@vercel/analytics": "^1.1.3",
"@vercel/edge-config": "^0.4.1",
"@vercel/analytics": "^1.2.2",
"@vercel/edge-config": "^1.1.0",
"@vercel/og": "^0.6.2",
"ariakit": "2.0.0-next.44",
"cmdk": "^0.2.1",
Expand All @@ -70,28 +70,28 @@
"@testing-library/user-event": "^14.5.2",
"@types/html-escaper": "^3.0.2",
"@types/node": "18.18.8",
"@types/react": "^18.2.54",
"@types/react-dom": "^18.2.18",
"@types/react": "^18.2.60",
"@types/react-dom": "^18.2.19",
"@unocss/eslint-plugin": "^0.58.5",
"@unocss/postcss": "^0.58.5",
"@unocss/reset": "^0.58.5",
"@vitejs/plugin-react": "^4.2.1",
"@vitest/coverage-v8": "^1.2.2",
"@vitest/coverage-v8": "^1.3.1",
"cross-env": "^7.0.3",
"eslint": "^8.56.0",
"eslint-config-neon": "^0.1.58",
"eslint": "^8.57.0",
"eslint-config-neon": "^0.1.59",
"eslint-formatter-pretty": "^6.0.1",
"happy-dom": "^13.3.8",
"happy-dom": "^13.6.2",
"hast-util-to-string": "^2.0.0",
"hastscript": "^8.0.0",
"html-escaper": "^3.0.3",
"postcss": "^8.4.34",
"postcss": "^8.4.35",
"prettier": "^3.2.5",
"turbo": "^1.12.2",
"turbo": "^1.12.4",
"typescript": "^5.3.3",
"unocss": "^0.58.5",
"vercel": "^33.4.1",
"vitest": "^1.2.2"
"vercel": "^33.5.3",
"vitest": "^1.3.1"
},
"engines": {
"node": ">=18"
Expand Down
1 change: 0 additions & 1 deletion apps/website/.env.development
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
NEXT_PUBLIC_LOCAL_DEV=true
METADATA_BASE_URL=http://localhost:3000
2 changes: 2 additions & 0 deletions apps/website/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ src/styles/unocss.css
lighthouse-results

.vercel

old_src
5 changes: 4 additions & 1 deletion apps/website/.prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
/** @type {import('prettier').Config} */
module.exports = require('../../.prettierrc.json');
module.exports = {
...require('../../.prettierrc.json'),
plugins: ['prettier-plugin-tailwindcss'],
};
23 changes: 16 additions & 7 deletions apps/website/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,23 +1,32 @@
import bundleAnalyzer from '@next/bundle-analyzer';
import localesPlugin from '@react-aria/optimize-locales-plugin';

const withBundleAnalyzer = bundleAnalyzer({
enabled: process.env.ANALYZE === 'true',
});

export default withBundleAnalyzer({
reactStrictMode: true,
experimental: {
typedRoutes: true,
serverComponentsExternalPackages: ['@rushstack/node-core-library', '@discordjs/api-extractor-model', 'jju'],
},
images: {
dangerouslyAllowSVG: true,
contentDispositionType: 'attachment',
contentSecurityPolicy: "default-src 'self'; frame-src 'none'; sandbox;",
},
poweredByHeader: false,
env: {
MAX_FETCH_SIZE: '5',
logging: {
fetches: {
fullUrl: true,
},
},
experimental: {
ppr: false,
},
webpack(config, { isServer }) {
if (!isServer) {
// Don't include any locale strings in the client JS bundle.
config.plugins.push(localesPlugin.webpack({ locales: [] }));
}

return config;
},
async redirects() {
return [
Expand Down
64 changes: 33 additions & 31 deletions apps/website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,58 +46,60 @@
},
"homepage": "https://discord.js.org",
"dependencies": {
"@discordjs/api-extractor-model": "workspace:^",
"@discordjs/api-extractor-utils": "workspace:^",
"@discordjs/scripts": "workspace:^",
"@discordjs/ui": "workspace:^",
"@microsoft/tsdoc": "^0.14.2",
"@microsoft/tsdoc-config": "0.16.2",
"@radix-ui/react-collapsible": "^1.0.3",
"@react-icons/all-files": "^4.1.0",
"@vercel/analytics": "^1.1.3",
"@vercel/edge-config": "^0.4.1",
"@vercel/analytics": "^1.2.2",
"@vercel/blob": "^0.22.1",
"@vercel/edge-config": "^1.1.0",
"@vercel/og": "^0.6.2",
"@vercel/postgres": "^0.7.2",
"ariakit": "2.0.0-next.44",
"bright": "^0.8.4",
"class-variance-authority": "^0.7.0",
"cmdk": "^0.2.1",
"geist": "^1.2.2",
"jotai": "^2.7.0",
"lucide-react": "^0.343.0",
"meilisearch": "^0.37.0",
"next": "14.1.0",
"next": "14.1.1-canary.80",
"next-mdx-remote": "^4.4.1",
"next-themes": "^0.2.1",
"overlayscrollbars": "^2.5.0",
"overlayscrollbars-react": "^0.5.4",
"react": "^18.2.0",
"react-custom-scrollbars-2": "^4.5.0",
"react-aria-components": "^1.1.1",
"react-dom": "^18.2.0",
"react-use": "^17.5.0",
"rehype-slug": "^5.1.0",
"remark-gfm": "^3.0.1",
"sharp": "^0.33.2",
"swr": "^2.2.4"
"usehooks-ts": "^2.15.1",
"vaul": "^0.9.0"
},
"devDependencies": {
"@next/bundle-analyzer": "14.1.0",
"@next/bundle-analyzer": "14.1.1-canary.80",
"@react-aria/optimize-locales-plugin": "^1.0.2",
"@shikijs/rehype": "1.1.7",
"@tailwindcss/typography": "^0.5.10",
"@testing-library/react": "^14.2.1",
"@testing-library/user-event": "^14.5.2",
"@types/node": "18.18.8",
"@types/react": "^18.2.54",
"@types/react-dom": "^18.2.18",
"@unocss/eslint-plugin": "^0.58.5",
"@unocss/postcss": "^0.58.5",
"@unocss/reset": "^0.58.5",
"@types/react": "^18.2.60",
"@types/react-dom": "^18.2.19",
"@vitejs/plugin-react": "^4.2.1",
"@vitest/coverage-v8": "^1.2.2",
"@vitest/coverage-v8": "^1.3.1",
"autoprefixer": "^10.4.17",
"cpy-cli": "^5.0.0",
"cross-env": "^7.0.3",
"eslint": "^8.56.0",
"eslint-config-neon": "^0.1.58",
"eslint": "^8.57.0",
"eslint-config-neon": "^0.1.59",
"eslint-formatter-pretty": "^6.0.1",
"happy-dom": "^13.3.8",
"postcss": "^8.4.34",
"happy-dom": "^13.6.2",
"postcss": "^8.4.35",
"prettier": "^3.2.5",
"turbo": "^1.12.2",
"prettier-plugin-tailwindcss": "^0.5.11",
"remark-gfm": "^3.0.1",
"remark-rehype": "^11.1.0",
"shiki": "1.1.7",
"tailwindcss": "^3.4.1",
"turbo": "^1.12.4",
"typescript": "^5.3.3",
"vercel": "^33.4.1",
"vitest": "^1.2.2"
"vercel": "^33.5.3",
"vitest": "^1.3.1"
},
"engines": {
"node": ">=18"
Expand Down
3 changes: 2 additions & 1 deletion apps/website/postcss.config.cjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module.exports = {
plugins: {
'@unocss/postcss': {},
tailwindcss: {},
autoprefixer: {},
},
};
28 changes: 0 additions & 28 deletions apps/website/src/app/_global-error.tsx

This file was deleted.

8 changes: 0 additions & 8 deletions apps/website/src/app/api/[package]/versions/route.ts

This file was deleted.

Loading

0 comments on commit 18cce83

Please sign in to comment.