mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 20:13:30 +01:00
build: better turbo config
This commit is contained in:
@@ -5,11 +5,13 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "vitest run",
|
"test": "vitest run",
|
||||||
|
"build:local": "yarn build:prod",
|
||||||
"build:prod": "yarn workspaces foreach -ptR run build && astro build",
|
"build:prod": "yarn workspaces foreach -ptR run build && astro build",
|
||||||
"dev": "yarn workspaces foreach -ptR run build && astro dev",
|
"dev": "yarn workspaces foreach -ptR run build && astro dev",
|
||||||
"preview": "astro preview",
|
"preview": "astro preview",
|
||||||
"lint": "prettier --check . && cross-env TIMING=1 eslint src --ext .mjs,.js,.cjs,.ts,.tsx,.astro --format=pretty",
|
"lint": "prettier --check . && cross-env TIMING=1 eslint src --ext .mjs,.js,.cjs,.ts,.tsx,.astro --format=pretty",
|
||||||
"format": "prettier --write . && cross-env TIMING=1 eslint src --ext .mjs,.js,.cjs,.ts,.tsx,.astro --fix --format=pretty"
|
"format": "prettier --write . && cross-env TIMING=1 eslint src --ext .mjs,.js,.cjs,.ts,.tsx,.astro --fix --format=pretty",
|
||||||
|
"fmt": "yarn format"
|
||||||
},
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"contributors": [
|
"contributors": [
|
||||||
|
|||||||
@@ -15,7 +15,8 @@
|
|||||||
"dev:css": "yarn generate:css --watch",
|
"dev:css": "yarn generate:css --watch",
|
||||||
"generate:css": "unocss 'src/**/*.tsx' '../../packages/ui/src/lib/components/**/*.tsx' --out-file ./src/styles/unocss.css --config ../../unocss.config.ts",
|
"generate:css": "unocss 'src/**/*.tsx' '../../packages/ui/src/lib/components/**/*.tsx' --out-file ./src/styles/unocss.css --config ../../unocss.config.ts",
|
||||||
"lint": "prettier --check . && cross-env TIMING=1 eslint src --ext .mjs,.js,.cjs,.ts,.tsx --format=pretty",
|
"lint": "prettier --check . && cross-env TIMING=1 eslint src --ext .mjs,.js,.cjs,.ts,.tsx --format=pretty",
|
||||||
"format": "prettier --write . && cross-env TIMING=1 eslint src --ext .mjs,.js,.cjs,.ts,.tsx --fix --format=pretty"
|
"format": "prettier --write . && cross-env TIMING=1 eslint src --ext .mjs,.js,.cjs,.ts,.tsx --fix --format=pretty",
|
||||||
|
"fmt": "yarn format"
|
||||||
},
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"contributors": [
|
"contributors": [
|
||||||
|
|||||||
@@ -6,6 +6,8 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "turbo run build",
|
"build": "turbo run build",
|
||||||
"build:affected": "turbo run build --filter='...[origin/main]'",
|
"build:affected": "turbo run build --filter='...[origin/main]'",
|
||||||
|
"build:apps": "turbo run build:local --filter='...{apps/*}'",
|
||||||
|
"build:apps:affected": "turbo run build:local --filter='...{apps/*}[origin/main]'",
|
||||||
"test": "turbo run test --parallel",
|
"test": "turbo run test --parallel",
|
||||||
"test:affected": "turbo run test --filter='...[origin/main]' --parallel",
|
"test:affected": "turbo run test --filter='...[origin/main]' --parallel",
|
||||||
"lint": "turbo run lint --parallel",
|
"lint": "turbo run lint --parallel",
|
||||||
|
|||||||
109
turbo.json
109
turbo.json
@@ -1,37 +1,140 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://turborepo.org/schema.json",
|
"$schema": "https://turborepo.org/schema.json",
|
||||||
|
"globalDependencies": ["yarn.lock"],
|
||||||
"pipeline": {
|
"pipeline": {
|
||||||
"build": {
|
"build": {
|
||||||
"dependsOn": ["^build"],
|
"dependsOn": ["^build"],
|
||||||
|
"inputs": ["../../tsconfig.json", "../../tsup.config.js", "src/**/*.ts", "tsconfig.json", "tsup.config.js"],
|
||||||
|
"outputs": ["dist/**"]
|
||||||
|
},
|
||||||
|
"@discordjs/ui#build": {
|
||||||
|
"dependsOn": ["^build"],
|
||||||
|
"inputs": ["../../tsconfig.json", "src/**/*.ts", "tsconfig.json", "vite.config.ts"],
|
||||||
"outputs": ["dist/**"]
|
"outputs": ["dist/**"]
|
||||||
},
|
},
|
||||||
"@discordjs/guide#build:prod": {
|
"@discordjs/guide#build:prod": {
|
||||||
"dependsOn": ["^build"],
|
"dependsOn": ["^build"],
|
||||||
|
"inputs": [
|
||||||
|
"../../tsconfig.json",
|
||||||
|
"src/**/*.astro",
|
||||||
|
"src/**/*.tsx",
|
||||||
|
"src/**/*.ts",
|
||||||
|
"src/**/*.css",
|
||||||
|
"src/**/*.mdx",
|
||||||
|
"astro.config.ts",
|
||||||
|
"tsconfig.json",
|
||||||
|
"vite.config.ts"
|
||||||
|
],
|
||||||
"outputs": ["dist/**"]
|
"outputs": ["dist/**"]
|
||||||
},
|
},
|
||||||
"@discordjs/website#build:prod": {
|
"@discordjs/website#build:prod": {
|
||||||
"dependsOn": ["^build"],
|
"dependsOn": ["^build"],
|
||||||
|
"env": ["NEXT_PUBLIC_LOCAL_DEV"],
|
||||||
|
"inputs": [
|
||||||
|
"../../tsconfig.json",
|
||||||
|
"src/**/*.tsx",
|
||||||
|
"src/**/*.ts",
|
||||||
|
"src/**/*.css",
|
||||||
|
"src/assets/**/*.ttf",
|
||||||
|
"src/assets/**/*.svg",
|
||||||
|
"scripts/**.js",
|
||||||
|
"next-env.d.ts",
|
||||||
|
"next.config.js",
|
||||||
|
"tsconfig.json",
|
||||||
|
"types.d.ts"
|
||||||
|
],
|
||||||
"outputs": [".next/**"]
|
"outputs": [".next/**"]
|
||||||
},
|
},
|
||||||
"test": {
|
"test": {
|
||||||
"dependsOn": ["^build"],
|
"dependsOn": ["^build"],
|
||||||
|
"inputs": [
|
||||||
|
"../../codecov.yml",
|
||||||
|
"../../tsconfig.json",
|
||||||
|
"../../vitest.config.ts",
|
||||||
|
"__tests_/**/*.ts",
|
||||||
|
"src/**/*.ts",
|
||||||
|
"src/**/*.js",
|
||||||
|
"tsconfig.json"
|
||||||
|
],
|
||||||
|
"outputs": ["coverage/**"]
|
||||||
|
},
|
||||||
|
"@discordjs/voice#test": {
|
||||||
|
"dependsOn": ["^build"],
|
||||||
|
"inputs": [
|
||||||
|
"../../tsconfig.json",
|
||||||
|
"__tests_/**/*.ts",
|
||||||
|
"__mocks__/**/*.ts",
|
||||||
|
"__mocks__/**/*.js",
|
||||||
|
"src/**/*.ts",
|
||||||
|
"src/**/*.js",
|
||||||
|
"babel.config.js",
|
||||||
|
"jest.config.js",
|
||||||
|
"tsconfig.json"
|
||||||
|
],
|
||||||
"outputs": ["coverage/**"]
|
"outputs": ["coverage/**"]
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
"dependsOn": ["^build"],
|
"dependsOn": ["^build"],
|
||||||
|
"inputs": [
|
||||||
|
"../../.eslintrc.json",
|
||||||
|
"../../.prettierrc.json",
|
||||||
|
"../../tsconfig.json",
|
||||||
|
"../../tsconfig.eslint.json",
|
||||||
|
"src/**/*.astro",
|
||||||
|
"src/**/*.tsx",
|
||||||
|
"src/**/*.ts",
|
||||||
|
"src/**/*.css",
|
||||||
|
"src/**/*.mdx",
|
||||||
|
"scripts/**.js",
|
||||||
|
"scripts/**.mjs",
|
||||||
|
".eslintignore",
|
||||||
|
".eslintrc.json",
|
||||||
|
"astro.config.ts",
|
||||||
|
"prettierignore",
|
||||||
|
"prettierrc.js",
|
||||||
|
"prettierrc.cjs",
|
||||||
|
"prettierrc.json",
|
||||||
|
"tsconfig.json",
|
||||||
|
"tsconfig.eslint.json",
|
||||||
|
"tsup.config.js",
|
||||||
|
"vite.config.ts"
|
||||||
|
],
|
||||||
"outputs": []
|
"outputs": []
|
||||||
},
|
},
|
||||||
"format": {
|
"format": {
|
||||||
"dependsOn": ["^build"],
|
"dependsOn": ["^build"],
|
||||||
|
"inputs": [
|
||||||
|
"../../.eslintrc.json",
|
||||||
|
"../../.prettierrc.json",
|
||||||
|
"../../tsconfig.json",
|
||||||
|
"../../tsconfig.eslint.json",
|
||||||
|
"src/**/*.astro",
|
||||||
|
"src/**/*.tsx",
|
||||||
|
"src/**/*.ts",
|
||||||
|
"src/**/*.css",
|
||||||
|
"src/**/*.mdx",
|
||||||
|
"scripts/**.js",
|
||||||
|
"scripts/**.mjs",
|
||||||
|
".eslintignore",
|
||||||
|
".eslintrc.json",
|
||||||
|
"astro.config.ts",
|
||||||
|
"prettierignore",
|
||||||
|
"prettierrc.js",
|
||||||
|
"prettierrc.cjs",
|
||||||
|
"prettierrc.json",
|
||||||
|
"tsconfig.json",
|
||||||
|
"tsconfig.eslint.json",
|
||||||
|
"tsup.config.js",
|
||||||
|
"vite.config.ts"
|
||||||
|
],
|
||||||
"outputs": []
|
"outputs": []
|
||||||
},
|
},
|
||||||
"docs": {
|
"docs": {
|
||||||
"dependsOn": ["^build"],
|
"dependsOn": ["^build"],
|
||||||
"outputs": ["docs/docs.json", "docs/docs.api.json"]
|
"outputs": ["../../api-extractor.json", "api-extractor.json", "docs/**", "tsconfig.json"]
|
||||||
},
|
},
|
||||||
"changelog": {
|
"changelog": {
|
||||||
"dependsOn": ["^build"],
|
"outputs": ["cliff.toml", "CHANGELOG.md"]
|
||||||
"outputs": ["CHANGELOG.md"]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user