Skip to content

Commit

Permalink
feat: web-components (#8715)
Browse files Browse the repository at this point in the history
  • Loading branch information
iCrawl authored Oct 7, 2022
1 parent 76a7021 commit 0ac3e76
Show file tree
Hide file tree
Showing 46 changed files with 2,250 additions and 316 deletions.
38 changes: 15 additions & 23 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,39 @@
'packages:builders':
packages:builders:
- packages/builders/*
- packages/builders/**/*

'packages:collection':
packages:collection:
- packages/collection/*
- packages/collection/**/*

'packages:discord.js':
packages:discord.js:
- packages/discord.js/*
- packages/discord.js/**/*

'packages:docgen':
packages:docgen:
- packages/docgen/*
- packages/docgen/**/*

'packages:guide':
packages:guide:
- packages/guide/*
- packages/guide/**/*

'packages:proxy':
packages:proxy:
- packages/proxy/*
- packages/proxy/**/*

'packages:proxy-container':
packages:proxy-container:
- packages/proxy-container/*
- packages/proxy-container/**/*

'packages:rest':
packages:rest:
- packages/rest/*
- packages/rest/**/*

'packages:util':
packages:util:
- packages/util/*
- packages/util/**/*

'packages:voice':
packages:voice:
- packages/voice/*
- packages/voice/**/*

'packages:website':
packages:website:
- packages/website/*
- packages/website/**/*

'packages:ws':
packages/web-components:
- packages:web-components/*
- packages:web-components/**/*
packages:ws:
- packages/ws/*
- packages/ws/**/*
206 changes: 104 additions & 102 deletions .github/labels.yml
Original file line number Diff line number Diff line change
@@ -1,106 +1,108 @@
- name: 'api changes'
- name: api changes
color: '5663e9'
- name: 'api support'
- name: api support
color: '5663e9'
- name: 'backlog'
color: '7ef7ef'
- name: 'blocked'
color: 'fc1423'
- name: 'bug'
color: 'd73a4a'
- name: 'caching'
color: '80c042'
- name: 'chore'
color: 'ffffff'
- name: 'ci'
color: '0075ca'
- name: 'dependencies'
color: '276bd1'
- name: 'discussion'
color: 'b6b1f9'
- name: 'discord'
- name: backlog
color: 7ef7ef
- name: blocked
color: fc1423
- name: bug
color: d73a4a
- name: caching
color: 80c042
- name: chore
color: ffffff
- name: ci
color: 0075ca
- name: dependencies
color: 276bd1
- name: discussion
color: b6b1f9
- name: discord
color: '5663e9'
- name: 'documentation'
color: '0075ca'
- name: 'duplicate'
color: 'cfd3d7'
- name: 'error handling'
color: '80c042'
- name: 'feature request'
color: 'fcf95a'
- name: 'gateway'
color: '80c042'
- name: 'good first issue'
color: '7057ff'
- name: 'has PR'
color: '4b1f8e'
- name: 'help wanted'
- name: documentation
color: 0075ca
- name: duplicate
color: cfd3d7
- name: error handling
color: 80c042
- name: feature request
color: fcf95a
- name: gateway
color: 80c042
- name: good first issue
color: 7057ff
- name: has PR
color: 4b1f8e
- name: help wanted
color: '008672'
- name: 'interactions'
color: '80c042'
- name: 'in progress'
color: 'ffccd7'
- name: 'in review'
color: 'aed5fc'
- name: 'invalid'
color: 'e4e669'
- name: 'need repro'
color: 'c66037'
- name: 'packages:builders'
color: 'fbca04'
- name: 'packages:collection'
color: 'fbca04'
- name: 'packages:discord.js'
color: 'fbca04'
- name: 'packages:docgen'
color: 'fbca04'
- name: 'packages:guide'
color: 'fbca04'
- name: 'packages:proxy'
color: 'fbca04'
- name: 'packages:proxy-container'
color: 'fbca04'
- name: 'packages:rest'
color: 'fbca04'
- name: 'packages:util'
color: 'fbca04'
- name: 'packages:voice'
color: 'fbca04'
- name: 'packages:website'
color: 'fbca04'
- name: 'packages:ws'
color: 'fbca04'
- name: 'performance'
color: '80c042'
- name: 'permissions'
color: '80c042'
- name: 'priority:high'
color: 'fc1423'
- name: 'question (please use Discord instead)'
color: 'd876e3'
- name: 'ratelimits'
color: '80c042'
- name: 'refactor'
color: '1d637f'
- name: 'regression'
color: 'ea8785'
- name: 'REST'
color: '80c042'
- name: 'semver:major'
color: 'c10f47'
- name: 'semver:minor'
color: 'e4f486'
- name: 'semver:patch'
color: 'e8be8b'
- name: 'sharding'
color: '80c042'
- name: 'tests'
color: 'f06dff'
- name: 'threads'
color: '80c042'
- name: 'typings'
color: '80c042'
- name: 'utility'
color: '80c042'
- name: 'wontfix'
color: 'ffffff'
- name: interactions
color: 80c042
- name: in progress
color: ffccd7
- name: in review
color: aed5fc
- name: invalid
color: e4e669
- name: need repro
color: c66037
- name: packages:builders
color: fbca04
- name: packages:collection
color: fbca04
- name: packages:discord.js
color: fbca04
- name: packages:docgen
color: fbca04
- name: packages:guide
color: fbca04
- name: packages:proxy
color: fbca04
- name: packages:proxy-container
color: fbca04
- name: packages:rest
color: fbca04
- name: packages:util
color: fbca04
- name: packages:voice
color: fbca04
- name: packages:website
color: fbca04
- name: packages:web-components
color: fbca04
- name: packages:ws
color: fbca04
- name: performance
color: 80c042
- name: permissions
color: 80c042
- name: priority:high
color: fc1423
- name: question (please use Discord instead)
color: d876e3
- name: ratelimits
color: 80c042
- name: refactor
color: 1d637f
- name: regression
color: ea8785
- name: REST
color: 80c042
- name: semver:major
color: c10f47
- name: semver:minor
color: e4f486
- name: semver:patch
color: e8be8b
- name: sharding
color: 80c042
- name: tests
color: f06dff
- name: threads
color: 80c042
- name: typings
color: 80c042
- name: utility
color: 80c042
- name: wontfix
color: ffffff
4 changes: 2 additions & 2 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"*": "prettier --ignore-unknown --write",
"{src/**,__tests__/**}.{mjs,js,ts}": "eslint --ext mjs,js,ts --fix",
"src/**.ts": "vitest related --run"
"{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"
}
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"files.associations": {
"*.mdx": "markdown"
},
"unocss.root": "./packages/website",
"unocss.root": "./packages/web-components",
"typescript.tsdk": "node_modules/typescript/lib"
}
4 changes: 2 additions & 2 deletions packages/actions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"scripts": {
"test": "vitest run",
"build": "tsup",
"lint": "prettier --check . && cross-env TIMING=1 eslint src __tests__ --ext mjs,js,ts",
"format": "prettier --write . && cross-env TIMING=1 eslint src __tests__ --ext mjs,js,ts --fix",
"lint": "prettier --check . && cross-env TIMING=1 eslint src __tests__ --ext .mjs,.js,.ts",
"format": "prettier --write . && cross-env TIMING=1 eslint src __tests__ --ext .mjs,.js,.ts --fix",
"fmt": "yarn format"
},
"main": "./dist/index.mjs",
Expand Down
4 changes: 2 additions & 2 deletions packages/api-extractor-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"private": true,
"scripts": {
"build": "tsup",
"lint": "prettier --check . && cross-env TIMING=1 eslint src --ext mjs,js,ts",
"format": "prettier --write . && cross-env TIMING=1 eslint src --ext mjs,js,ts --fix",
"lint": "prettier --check . && cross-env TIMING=1 eslint src --ext .mjs,.js,.ts",
"format": "prettier --write . && cross-env TIMING=1 eslint src --ext .mjs,.js,.ts --fix",
"fmt": "yarn format"
},
"main": "./dist/index.js",
Expand Down
4 changes: 2 additions & 2 deletions packages/builders/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"scripts": {
"test": "vitest run",
"build": "tsup",
"lint": "prettier --check . && cross-env TIMING=1 eslint src __tests__ --ext mjs,js,ts",
"format": "prettier --write . && cross-env TIMING=1 eslint src __tests__ --ext mjs,js,ts --fix",
"lint": "prettier --check . && cross-env TIMING=1 eslint src __tests__ --ext .mjs,.js,.ts",
"format": "prettier --write . && cross-env TIMING=1 eslint src __tests__ --ext .mjs,.js,.ts --fix",
"fmt": "yarn format",
"docs": "downlevel-dts dist docs/dist --to=3.7 && api-extractor run --local",
"prepack": "yarn lint && yarn test && yarn build",
Expand Down
4 changes: 2 additions & 2 deletions packages/collection/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"scripts": {
"test": "vitest run",
"build": "tsup",
"lint": "prettier --check . && cross-env TIMING=1 eslint src __tests__ --ext mjs,js,ts",
"format": "prettier --write . && cross-env TIMING=1 eslint src __tests__ --ext mjs,js,ts --fix",
"lint": "prettier --check . && cross-env TIMING=1 eslint src __tests__ --ext .mjs,.js,.ts",
"format": "prettier --write . && cross-env TIMING=1 eslint src __tests__ --ext .mjs,.js,.ts --fix",
"fmt": "yarn format",
"docs": "downlevel-dts dist docs/dist --to=3.7 && api-extractor run --local",
"prepack": "yarn lint && yarn test && yarn build",
Expand Down
4 changes: 2 additions & 2 deletions packages/docgen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"description": "The docs.json generator for discord.js and its related projects",
"scripts": {
"build": "tsup",
"lint": "prettier --check . && cross-env TIMING=1 eslint src --ext mjs,js,ts",
"format": "prettier --write . && cross-env TIMING=1 eslint src --ext mjs,js,ts --fix",
"lint": "prettier --check . && cross-env TIMING=1 eslint src --ext .mjs,.js,.ts",
"format": "prettier --write . && cross-env TIMING=1 eslint src --ext .mjs,.js,.ts --fix",
"fmt": "yarn format",
"prepack": "yarn format && yarn build"
},
Expand Down
4 changes: 3 additions & 1 deletion packages/guide/astro.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ export default defineConfig({
image({
serviceEntryPoint: '@astrojs/image/sharp',
}),
Unocss(),
Unocss({
configFile: fileURLToPath(new URL('../ui/unocss.config.ts', import.meta.url)),
}),
],
markdown: {
remarkPlugins: [[remarkCodeHike, { autoImport: false, theme: shikiThemeDarkPlus, lineNumbers: true }]],
Expand Down
9 changes: 5 additions & 4 deletions packages/guide/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "@discordjs/guide",
"version": "0.1.0",
"description": "",
"description": "Imagine a guide... that explores the many possibilities for your discord.js bot",
"private": true,
"scripts": {
"test": "vitest run",
"build:prod": "astro build",
"build:prod": "yarn workspace @discordjs/ui run build && astro build",
"dev": "astro dev",
"preview": "astro preview",
"lint": "prettier --check . && cross-env TIMING=1 eslint src --ext mjs,js,ts,tsx,astro",
"format": "prettier --write . && cross-env TIMING=1 eslint src --ext mjs,js,ts,tsx,astro --fix"
"lint": "prettier --check . && cross-env TIMING=1 eslint src --ext .mjs,.js,.cjs,.ts,.tsx,.astro",
"format": "prettier --write . && cross-env TIMING=1 eslint src --ext .mjs,.js,.cjs,.ts,.tsx,.astro --fix"
},
"type": "module",
"contributors": [
Expand Down Expand Up @@ -38,6 +38,7 @@
"@astrojs/mdx": "^0.11.4",
"@astrojs/react": "^1.1.4",
"@code-hike/mdx": "^0.7.4",
"@discordjs/ui": "workspace:^",
"@vscode/codicons": "^0.0.32",
"ariakit": "^2.0.0-next.41",
"astro": "^1.4.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/guide/src/components/SidebarItems.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Section } from '@discordjs/ui';
import type { MDXInstance } from 'astro';
import { Section } from './Section.jsx';

export type MDXPage = MDXInstance<{ category: string; title: string }>;

Expand Down
Loading

2 comments on commit 0ac3e76

@vercel
Copy link

@vercel vercel bot commented on 0ac3e76 Oct 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 0ac3e76 Oct 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.