chore: move website and guide out of packages

This commit is contained in:
iCrawl
2022-10-10 01:22:48 +02:00
parent 0a9d57b011
commit 3ed668e539
175 changed files with 428 additions and 487 deletions

19
.github/labeler.yml vendored
View File

@@ -1,3 +1,10 @@
apps:guide:
- apps/guide/*
- apps/guide/**/*
apps:website:
- apps/website/*
- apps/website/**/*
packages:builders: packages:builders:
- packages/builders/* - packages/builders/*
- packages/builders/**/* - packages/builders/**/*
@@ -10,9 +17,6 @@ packages:discord.js:
packages:docgen: packages:docgen:
- packages/docgen/* - packages/docgen/*
- packages/docgen/**/* - packages/docgen/**/*
packages:guide:
- packages/guide/*
- packages/guide/**/*
packages:proxy: packages:proxy:
- packages/proxy/* - packages/proxy/*
- packages/proxy/**/* - packages/proxy/**/*
@@ -22,18 +26,15 @@ packages:proxy-container:
packages:rest: packages:rest:
- packages/rest/* - packages/rest/*
- packages/rest/**/* - packages/rest/**/*
packages/ui:
- packages:ui/*
- packages:ui/**/*
packages:util: packages:util:
- packages/util/* - packages/util/*
- packages/util/**/* - packages/util/**/*
packages:voice: packages:voice:
- packages/voice/* - packages/voice/*
- packages/voice/**/* - packages/voice/**/*
packages:website:
- packages/website/*
- packages/website/**/*
packages/web-components:
- packages:web-components/*
- packages:web-components/**/*
packages:ws: packages:ws:
- packages/ws/* - packages/ws/*
- packages/ws/**/* - packages/ws/**/*

12
.github/labels.yml vendored
View File

@@ -2,6 +2,10 @@
color: '5663e9' color: '5663e9'
- name: api support - name: api support
color: '5663e9' color: '5663e9'
- name: apps:guide
color: fbca04
- name: apps:website
color: fbca04
- name: backlog - name: backlog
color: 7ef7ef color: 7ef7ef
- name: blocked - name: blocked
@@ -54,22 +58,18 @@
color: fbca04 color: fbca04
- name: packages:docgen - name: packages:docgen
color: fbca04 color: fbca04
- name: packages:guide
color: fbca04
- name: packages:proxy - name: packages:proxy
color: fbca04 color: fbca04
- name: packages:proxy-container - name: packages:proxy-container
color: fbca04 color: fbca04
- name: packages:rest - name: packages:rest
color: fbca04 color: fbca04
- name: packages:ui
color: fbca04
- name: packages:util - name: packages:util
color: fbca04 color: fbca04
- name: packages:voice - name: packages:voice
color: fbca04 color: fbca04
- name: packages:website
color: fbca04
- name: packages:web-components
color: fbca04
- name: packages:ws - name: packages:ws
color: fbca04 color: fbca04
- name: performance - name: performance

View File

@@ -22,6 +22,6 @@ jobs:
run: yarn --immutable run: yarn --immutable
- name: Deprecate versions - name: Deprecate versions
run: 'yarn npm-deprecate --name "*dev*" --package @discordjs/builders @discordjs/collection discord.js @discordjs/proxy @discordjs/rest @discordjs/util @discordjs/voice' run: 'yarn npm-deprecate --name "*dev*" --package @discordjs/builders @discordjs/collection discord.js @discordjs/proxy @discordjs/rest @discordjs/util @discordjs/voice @discordjs/ws'
env: env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

View File

@@ -14,4 +14,4 @@ jobs:
- name: Automatically assign reviewers - name: Automatically assign reviewers
if: github.event.action == 'opened' if: github.event.action == 'opened'
uses: kentaro-m/auto-assign-action@v1.2.1 uses: kentaro-m/auto-assign-action@v1.2.3

View File

@@ -12,7 +12,6 @@ jobs:
env: env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }} TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
NEXT_PUBLIC_LOCAL_DEV: true
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
@@ -35,6 +34,9 @@ jobs:
- name: Tests - name: Tests
run: yarn test run: yarn test
- name: Docs
run: yarn docs
- name: Upload Coverage - name: Upload Coverage
if: github.repository_owner == 'discordjs' if: github.repository_owner == 'discordjs'
uses: ./packages/actions/src/uploadCoverage uses: ./packages/actions/src/uploadCoverage

View File

@@ -1,5 +1,5 @@
{ {
"*": "prettier --ignore-unknown --write", "*": "prettier --ignore-unknown --write",
"{src/**,__tests__/**}.{mjs,js,cjs,ts,tsx,astro}": "eslint --ext .mjs,.js,.cjs,.ts,.tsx,.astro --fix", "{src/**,__tests__/**}.{mjs,js,cjs,ts,tsx,astro}": "eslint --ext .mjs,.js,.cjs,.ts,.tsx,.astro --fix",
"src/**.ts": "vitest related --run --config ./vitest.config.ts" "src/**.ts": "vitest related --run --config ../../vitest.config.ts"
} }

View File

@@ -1,5 +1,5 @@
{ {
"eslint.workingDirectories": [{ "pattern": "./packages/*" }], "eslint.workingDirectories": [{ "pattern": "./apps/*" }, { "pattern": "./packages/*" }],
"eslint.validate": ["javascript", "javascriptreact", "astro", "typescript", "typescriptreact"], "eslint.validate": ["javascript", "javascriptreact", "astro", "typescript", "typescriptreact"],
"prettier.documentSelectors": ["**/*.astro"], "prettier.documentSelectors": ["**/*.astro"],
"editor.defaultFormatter": "esbenp.prettier-vscode", "editor.defaultFormatter": "esbenp.prettier-vscode",
@@ -11,6 +11,6 @@
"files.associations": { "files.associations": {
"*.mdx": "markdown" "*.mdx": "markdown"
}, },
"unocss.root": "./packages/web-components", "unocss.root": "./packages/ui",
"typescript.tsdk": "node_modules/typescript/lib" "typescript.tsdk": "node_modules/typescript/lib"
} }

View File

@@ -130,7 +130,7 @@ If you don't understand something in the documentation, you are experiencing pro
nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord]. nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord].
[website]: https://discord.js.org/ [website]: https://discord.js.org/
[website-source]: https://github.com/discordjs/discord.js/tree/main/packages/website [website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website
[documentation]: https://discord.js.org/#/docs [documentation]: https://discord.js.org/#/docs
[guide]: https://discordjs.guide/ [guide]: https://discordjs.guide/
[guide-source]: https://github.com/discordjs/guide [guide-source]: https://github.com/discordjs/guide

View File

@@ -34,13 +34,13 @@ If you don't understand something in the documentation, you are experiencing pro
nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord]. nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord].
[website]: https://discord.js.org/ [website]: https://discord.js.org/
[website-source]: https://github.com/discordjs/discord.js/tree/main/packages/website [website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website
[documentation]: https://discord.js.org/ [documentation]: https://discord.js.org/
[guide]: https://discordjs.guide/ [guide]: https://discordjs.guide/
[guide-source]: https://github.com/discordjs/guide [guide-source]: https://github.com/discordjs/guide
[guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html [guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html
[discord]: https://discord.gg/djs [discord]: https://discord.gg/djs
[discord-api]: https://discord.gg/discord-api [discord-api]: https://discord.gg/discord-api
[source]: https://github.com/discordjs/discord.js/tree/main/packages/guide [source]: https://github.com/discordjs/discord.js/tree/main/apps/guide
[related-libs]: https://discord.com/developers/docs/topics/community-resources#libraries [related-libs]: https://discord.com/developers/docs/topics/community-resources#libraries
[contributing]: https://github.com/discordjs/discord.js/blob/main/.github/CONTRIBUTING.md [contributing]: https://github.com/discordjs/discord.js/blob/main/.github/CONTRIBUTING.md

View File

@@ -54,7 +54,7 @@ export default defineConfig({
throttle: 3, throttle: 3,
}), }),
Unocss({ Unocss({
configFile: fileURLToPath(new URL('../ui/unocss.config.ts', import.meta.url)), configFile: fileURLToPath(new URL('../../packages/ui/unocss.config.ts', import.meta.url)),
}), }),
critters(), critters(),
compress(), compress(),

View File

@@ -58,8 +58,8 @@
"@types/react": "^17.0.50", "@types/react": "^17.0.50",
"@types/react-dom": "^17.0.17", "@types/react-dom": "^17.0.17",
"@types/react-syntax-highlighter": "^15.5.5", "@types/react-syntax-highlighter": "^15.5.5",
"@unocss/cli": "^0.45.28", "@unocss/cli": "^0.45.29",
"@unocss/reset": "^0.45.28", "@unocss/reset": "^0.45.29",
"@vitejs/plugin-react": "^2.1.0", "@vitejs/plugin-react": "^2.1.0",
"@vitest/coverage-c8": "^0.24.0", "@vitest/coverage-c8": "^0.24.0",
"astro": "^1.4.6", "astro": "^1.4.6",
@@ -67,7 +67,7 @@
"astro-critters": "^1.0.5", "astro-critters": "^1.0.5",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"eslint": "^8.25.0", "eslint": "^8.25.0",
"eslint-config-neon": "^0.1.35", "eslint-config-neon": "^0.1.37",
"happy-dom": "^7.4.0", "happy-dom": "^7.4.0",
"hast-util-to-string": "^2.0.0", "hast-util-to-string": "^2.0.0",
"hastscript": "^7.0.2", "hastscript": "^7.0.2",
@@ -78,7 +78,7 @@
"rehype-autolink-headings": "^6.1.1", "rehype-autolink-headings": "^6.1.1",
"rehype-slug": "^5.0.1", "rehype-slug": "^5.0.1",
"typescript": "^4.8.4", "typescript": "^4.8.4",
"unocss": "^0.45.28", "unocss": "^0.45.29",
"vercel": "^28.4.8", "vercel": "^28.4.8",
"vitest": "^0.24.0" "vitest": "^0.24.0"
}, },

View File

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

View File

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

Before

Width:  |  Height:  |  Size: 561 B

After

Width:  |  Height:  |  Size: 561 B

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 68 KiB

View File

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -34,13 +34,13 @@ If you don't understand something in the documentation, you are experiencing pro
nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord]. nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord].
[website]: https://discord.js.org/ [website]: https://discord.js.org/
[website-source]: https://github.com/discordjs/discord.js/tree/main/packages/website [website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website
[documentation]: https://discord.js.org/ [documentation]: https://discord.js.org/
[guide]: https://discordjs.guide/ [guide]: https://discordjs.guide/
[guide-source]: https://github.com/discordjs/guide [guide-source]: https://github.com/discordjs/guide
[guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html [guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html
[discord]: https://discord.gg/djs [discord]: https://discord.gg/djs
[discord-api]: https://discord.gg/discord-api [discord-api]: https://discord.gg/discord-api
[source]: https://github.com/discordjs/discord.js/tree/main/packages/website [source]: https://github.com/discordjs/discord.js/tree/main/apps/website
[related-libs]: https://discord.com/developers/docs/topics/community-resources#libraries [related-libs]: https://discord.com/developers/docs/topics/community-resources#libraries
[contributing]: https://github.com/discordjs/discord.js/blob/main/.github/CONTRIBUTING.md [contributing]: https://github.com/discordjs/discord.js/blob/main/.github/CONTRIBUTING.md

View File

@@ -13,7 +13,7 @@
"dev": "yarn run --top-level docs && concurrently 'yarn dev:css' 'yarn dev:next'", "dev": "yarn run --top-level docs && concurrently 'yarn dev:css' 'yarn dev:next'",
"dev:next": "next dev", "dev:next": "next dev",
"dev:css": "yarn generate:css --watch", "dev:css": "yarn generate:css --watch",
"generate:css": "unocss 'src/**/*.tsx' '../ui/src/lib/components/**/*.tsx' --out-file ./src/styles/unocss.css --config ../ui/unocss.config.ts", "generate:css": "unocss 'src/**/*.tsx' '../../packages/ui/src/lib/components/**/*.tsx' --out-file ./src/styles/unocss.css --config ../../packages/ui/unocss.config.ts",
"lint": "prettier --check . && cross-env TIMING=1 eslint src --ext .mjs,.js,.cjs,.ts,.tsx", "lint": "prettier --check . && cross-env TIMING=1 eslint src --ext .mjs,.js,.cjs,.ts,.tsx",
"format": "prettier --write . && cross-env TIMING=1 eslint src --ext .mjs,.js,.cjs,.ts,.tsx --fix" "format": "prettier --write . && cross-env TIMING=1 eslint src --ext .mjs,.js,.cjs,.ts,.tsx --fix"
}, },
@@ -75,19 +75,19 @@
"@types/react": "^18.0.21", "@types/react": "^18.0.21",
"@types/react-dom": "^18.0.6", "@types/react-dom": "^18.0.6",
"@types/react-syntax-highlighter": "^15.5.5", "@types/react-syntax-highlighter": "^15.5.5",
"@unocss/cli": "^0.45.28", "@unocss/cli": "^0.45.29",
"@unocss/reset": "^0.45.28", "@unocss/reset": "^0.45.29",
"@vitejs/plugin-react": "^2.1.0", "@vitejs/plugin-react": "^2.1.0",
"@vitest/coverage-c8": "^0.24.0", "@vitest/coverage-c8": "^0.24.0",
"concurrently": "^7.4.0", "concurrently": "^7.4.0",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"eslint": "^8.25.0", "eslint": "^8.25.0",
"eslint-config-neon": "^0.1.35", "eslint-config-neon": "^0.1.37",
"happy-dom": "^7.4.0", "happy-dom": "^7.4.0",
"prettier": "^2.7.1", "prettier": "^2.7.1",
"prettier-plugin-tailwindcss": "^0.1.13", "prettier-plugin-tailwindcss": "^0.1.13",
"typescript": "^4.8.4", "typescript": "^4.8.4",
"unocss": "^0.45.28", "unocss": "^0.45.29",
"vercel": "^28.4.8", "vercel": "^28.4.8",
"vitest": "^0.24.0" "vitest": "^0.24.0"
}, },

View File

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

View File

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

Before

Width:  |  Height:  |  Size: 561 B

After

Width:  |  Height:  |  Size: 561 B

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 68 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Some files were not shown because too many files have changed in this diff Show More