mirror of
https://github.com/discordjs/discord.js.git
synced 2024-08-20 21:04:49 +12:00
build: better turbo config
This commit is contained in:
parent
650f4ddfb2
commit
f0120538bb
4 changed files with 113 additions and 5 deletions
|
@ -5,11 +5,13 @@
|
|||
"private": true,
|
||||
"scripts": {
|
||||
"test": "vitest run",
|
||||
"build:local": "yarn build:prod",
|
||||
"build:prod": "yarn workspaces foreach -ptR run build && astro build",
|
||||
"dev": "yarn workspaces foreach -ptR run build && astro dev",
|
||||
"preview": "astro preview",
|
||||
"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",
|
||||
"contributors": [
|
||||
|
|
|
@ -15,7 +15,8 @@
|
|||
"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",
|
||||
"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",
|
||||
"contributors": [
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
"scripts": {
|
||||
"build": "turbo run build",
|
||||
"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:affected": "turbo run test --filter='...[origin/main]' --parallel",
|
||||
"lint": "turbo run lint --parallel",
|
||||
|
|
109
turbo.json
109
turbo.json
|
@ -1,37 +1,140 @@
|
|||
{
|
||||
"$schema": "https://turborepo.org/schema.json",
|
||||
"globalDependencies": ["yarn.lock"],
|
||||
"pipeline": {
|
||||
"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/**"]
|
||||
},
|
||||
"@discordjs/guide#build:prod": {
|
||||
"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/**"]
|
||||
},
|
||||
"@discordjs/website#build:prod": {
|
||||
"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/**"]
|
||||
},
|
||||
"test": {
|
||||
"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/**"]
|
||||
},
|
||||
"lint": {
|
||||
"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": []
|
||||
},
|
||||
"format": {
|
||||
"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": []
|
||||
},
|
||||
"docs": {
|
||||
"dependsOn": ["^build"],
|
||||
"outputs": ["docs/docs.json", "docs/docs.api.json"]
|
||||
"outputs": ["../../api-extractor.json", "api-extractor.json", "docs/**", "tsconfig.json"]
|
||||
},
|
||||
"changelog": {
|
||||
"dependsOn": ["^build"],
|
||||
"outputs": ["CHANGELOG.md"]
|
||||
"outputs": ["cliff.toml", "CHANGELOG.md"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue