Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to explicit Turborepo config #2150

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/app-frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"dev": "vite",
"lint": "eslint . && prettier --check .",
"fix": "eslint . --fix && prettier --write ."
},
Expand Down
6 changes: 3 additions & 3 deletions apps/app-playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"name": "@modrinth/app-playground",
"scripts": {
"build": "cargo build --release",
"lint": "cargo fmt --check && cargo clippy -- -D warnings",
"fix": "cargo fmt && cargo clippy --fix",
"dev": "cargo run",
"test": "cargo test"
"test": "cargo test",
"lint": "cargo fmt --check && cargo clippy -- -D warnings",
"fix": "cargo fmt && cargo clippy --fix"
}
}
162 changes: 148 additions & 14 deletions turbo.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,164 @@
{
"$schema": "https://turbo.build/schema.json",
"tasks": {
"build": {
// @modrinth/app
"@modrinth/app#build": {
"dependsOn": ["^build"],
"inputs": ["$TURBO_DEFAULT$", ".env*"],
"outputs": [".nuxt/**", "dist/**", ".output/**", "target/**"],
"inputs": ["$TURBO_DEFAULT$", "!**/*.md", "!LICENSE"],
"outputs": ["target"]
},
"@modrinth/app#dev": {
brawaru marked this conversation as resolved.
Show resolved Hide resolved
"cache": false,
"persistent": true,
"env": ["*"]
},
"@modrinth/app#test": {
"inputs": ["$TURBO_DEFAULT$", "!**/*.md", "!LICENSE"]
},
"@modrinth/app#lint": {
"inputs": ["$TURBO_DEFAULT$", "!LICENSE"]
},
"@modrinth/app#fix": {
"inputs": ["$TURBO_DEFAULT$", "!LICENSE"]
},

// @modrinth/app-frontend
"@modrinth/app-frontend#build": {
"dependsOn": ["^build"],
"inputs": ["$TURBO_DEFAULT$", "!**/*.md", "!LICENSE"],
"outputs": ["dist"],
"env": ["BASE_URL", "BROWSER_BASE_URL"]
},
"@modrinth/app-frontend#dev": {
"cache": false,
"persistent": true,
"env": ["BASE_URL", "BROWSER_BASE_URL"]
},
"@modrinth/app-frontend#lint": {
"inputs": ["$TURBO_DEFAULT$", "!LICENSE"]
},
"@modrinth/app-frontend#fix": {
"inputs": ["$TURBO_DEFAULT$", "!LICENSE"]
},

// @modrinth/app-playground
"@modrinth/app-playground#build": {
"dependsOn": ["^build"],
"inputs": ["$TURBO_DEFAULT$", "!**/*.md", "!LICENSE"],
"outputs": ["target"]
},
"@modrinth/app-playground#dev": {
"cache": false,
"persistent": true,
"env": ["*"]
},
"@modrinth/app-playground#test": {
"inputs": ["$TURBO_DEFAULT$", "!**/*.md", "!LICENSE"]
},
"@modrinth/app-playground#lint": {
"inputs": ["$TURBO_DEFAULT$", "!LICENSE"]
},
"@modrinth/app-playground#fix": {
"inputs": ["$TURBO_DEFAULT$", "!LICENSE"]
},

// @modrinth/frontend
"@modrinth/frontend#build": {
"dependsOn": ["^build"],
"inputs": ["$TURBO_DEFAULT$", ".env", ".env.*", "!*.md", "!LICENSE", "!src/generated"],
"outputs": [".nuxt", ".output", "src/generated"],
"env": [
"NODE_ENV",
"SITE_URL",
"BASE_URL",
"FLAG_OVERRIDES",
"BROWSER_BASE_URL",
"RATE_LIMIT_IGNORE_KEY",
"VERCEL_*",
"CF_PAGES_*",
"HEROKU_APP_NAME"
"SITE_URL",
"FLAG_OVERRIDES",
"STRIPE_PUBLISHABLE_KEY"
]
},
"lint": {},
"dev": {
"@modrinth/frontend#dev": {
"cache": false,
"persistent": true,
"env": [
"*"
"BASE_URL",
"BROWSER_BASE_URL",
"RATE_LIMIT_IGNORE_KEY",
"SITE_URL",
"FLAG_OVERRIDES",
"STRIPE_PUBLISHABLE_KEY"
]
},
"test": {}
}
"@modrinth/frontend#preview": {
"dependsOn": ["build"],
"inputs": [".output"]
},
"@modrinth/frontend#lint": {
"inputs": ["$TURBO_DEFAULT$", "!LICENSE"]
},
"@modrinth/frontend#fix": {
"inputs": ["$TURBO_DEFAULT$", "!LICENSE"]
},
"@modrinth/frontend#intl:extract": {
"inputs": [
"src/**/*.vue",
"src/**/*.ts",
"src/**/*.tsx",
"src/**/*.js",
"src/**/*.jsx",
"src/**/*.mts",
"src/**/*.cts",
"src/**/*.mjs",
"src/**/*.cjs",
"!src/**/*.d.ts"
],
"outputs": ["src/locales/en-US/index.json"]
},

// @modrinth/app-lib
"@modrinth/app-lib#build": {
"inputs": ["$TURBO_DEFAULT$", "!**/*.md", "!LICENSE"],
"outputs": ["target"]
},
"@modrinth/app-lib#lint": {
"inputs": ["$TURBO_DEFAULT$", "!LICENSE"]
},
"@modrinth/app-lib#fix": {
"inputs": ["$TURBO_DEFAULT$", "!LICENSE"]
},
"@modrinth/app-lib#test": {
"inputs": ["$TURBO_DEFAULT$", "!LICENSE"]
},

// @modrinth/assets
"@modrinth/assets#lint": {
"inputs": ["$TURBO_DEFAULT$", "!LICENSE"]
},
"@modrinth/assets#fix": {
"inputs": ["$TURBO_DEFAULT$", "!LICENSE"]
},

// @modrinth/ui
"@modrinth/ui#lint": {
"inputs": ["$TURBO_DEFAULT$", "!LICENSE"]
},
"@modrinth/ui#fix": {
"inputs": ["$TURBO_DEFAULT$", "!LICENSE"]
},

// @modrinth/utils
"@modrinth/utils#lint": {
"inputs": ["$TURBO_DEFAULT$", "!LICENSE"]
},
"@modrinth/utils#fix": {
"inputs": ["$TURBO_DEFAULT$", "!LICENSE"]
},

"build": {},
"dev": {},
"test": {},
"lint": {},
"fix": {},
"intl:extract": {}
},
"globalEnv": ["NODE_ENV", "TAURI_*", "VERCEL_*", "HEROKU_*", "CF_PAGES_*"]
}