mirror of
https://github.com/SableClient/Sable.git
synced 2026-11-20 00:51:17 -08:00
138 lines
3.9 KiB
TOML
138 lines
3.9 KiB
TOML
min_version = '2026.7.11'
|
|
|
|
[env]
|
|
_.path = ["{{config_root}}/node_modules/.bin"]
|
|
NODE_OPTIONS = "--max-old-space-size=4192"
|
|
|
|
[settings]
|
|
idiomatic_version_file_enable_tools = ["pnpm", "node"]
|
|
minimum_release_age = "1d"
|
|
experimental = true
|
|
|
|
[task_config]
|
|
includes = ["scripts"]
|
|
|
|
[tasks.setup]
|
|
description = "Install dependencies with pnpm"
|
|
run = 'pnpm install'
|
|
sources = ['package.json', 'pnpm-lock.yaml', 'pnpm-workspace.yaml', 'mise.toml']
|
|
outputs = ['node_modules/.pnpm/lock.yaml']
|
|
|
|
[tasks.dev]
|
|
description = "Start Vite dev server"
|
|
alias = "d"
|
|
run = "vite dev"
|
|
raw = true
|
|
|
|
[tasks.build]
|
|
description = "Build frontend with Vite"
|
|
alias = "b"
|
|
run = "vite build"
|
|
|
|
[tasks.preview]
|
|
description = "Preview the production build"
|
|
alias = "p"
|
|
run = "vite preview"
|
|
|
|
[tasks.lint]
|
|
description = "Check lint, types, formatting, and dead code"
|
|
alias = "l"
|
|
run = ["tsc", "oxlint .", "oxfmt --check .", "knip"]
|
|
|
|
[tasks."lint:fix"]
|
|
description = "Fix lint, formatting, and dead code issues"
|
|
alias = "lf"
|
|
run = ["oxlint . --fix", "oxfmt .", "knip --fix"]
|
|
|
|
[tasks.test]
|
|
description = "Run tests"
|
|
alias = "t"
|
|
run = "vitest"
|
|
raw = true
|
|
|
|
[tasks.knope]
|
|
run = "knope"
|
|
raw_args = true
|
|
hide = true
|
|
tools = { "cargo:knope" = "0.23.0", cargo-binstall = "1.20.1" }
|
|
|
|
[tasks."knope:document-change"]
|
|
description = "Document a change with knope"
|
|
alias = ["doc", "doc"]
|
|
run = { task = "knope", args = ["document-change"] }
|
|
|
|
[tasks."tauri:setup"]
|
|
description = "Install Tauri tools and system packages"
|
|
run = ["mise install", "mise bootstrap packages apply --yes --update"]
|
|
env = { MISE_ENV = "tauri" }
|
|
|
|
[tasks."tauri:setup:android"]
|
|
description = "Install Android SDK packages + NDK (no Android Studio needed)"
|
|
depends = ["tauri:setup"]
|
|
env = { MISE_ENV = "tauri" }
|
|
run = [
|
|
"yes | sdkmanager --licenses",
|
|
'sdkmanager "platform-tools" "platforms;android-36" "build-tools;35.0.0" "ndk;{{env.ANDROID_NDK_VERSION}}"',
|
|
]
|
|
|
|
[tasks."tauri:setup:macos"]
|
|
description = "Install Xcode"
|
|
confirm = { message = "Install Xcode? (required for Tauri)", default = "no" }
|
|
run = "xcode-select --print-path >/dev/null 2>&1 || xcode-select --install"
|
|
|
|
[tasks."tauri:setup:ios"]
|
|
description = "Set up iOS Xcode project"
|
|
depends = ["tauri:setup:macos"]
|
|
confirm = { message = "Set up iOS Xcode project? (required for Tauri)", default = "no" }
|
|
run = ["command -v pod >/dev/null 2>&1 || brew install cocoapods", "pnpm tauri ios init"]
|
|
|
|
[tasks."tauri:setup:windows"]
|
|
description = "Install Visual Studio Build Tools + WebView2 runtime"
|
|
confirm = { message = "Install Visual Studio Build Tools and WebView2 runtime? (required for Tauri)", default = "no" }
|
|
run = [
|
|
"winget install --id Microsoft.VisualStudio.BuildTools --source winget --force --override '--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --add Microsoft.VisualStudio.Component.Windows11SDK.26100 --addProductLang En-us'",
|
|
"winget install --id Microsoft.EdgeWebView2Runtime --source winget",
|
|
]
|
|
|
|
|
|
[tasks."cargo:lint"]
|
|
description = "Check Rust formatting and Clippy lints"
|
|
alias = ["cl", "cargo-lint"]
|
|
dir = "src-tauri"
|
|
run = ["cargo fmt --check", "cargo clippy --locked --all-targets --all-features -- -D warnings"]
|
|
|
|
[tasks."cargo:lint:fix"]
|
|
description = "Fix Rust formatting and Clippy issues"
|
|
alias = ["clf", "cargo-lint-fix"]
|
|
dir = "src-tauri"
|
|
run = ["cargo fmt", "cargo clippy --fix --allow-dirty --all-targets --all-features -- -D warnings"]
|
|
|
|
[tasks."cargo:test"]
|
|
description = "Run Rust tests"
|
|
alias = ["ct", "cargo-test"]
|
|
dir = "src-tauri"
|
|
run = "cargo test --locked"
|
|
raw = true
|
|
|
|
[tasks."actions:pin"]
|
|
description = "Pin GitHub Actions to SHA commit hashes"
|
|
run = "pinact run"
|
|
tools = { "pinact" = "latest" }
|
|
|
|
[tasks."actions:audit"]
|
|
description = "Audit GitHub Actions for security issues"
|
|
run = "zizmor .github/workflows"
|
|
tools = { "zizmor" = "latest" }
|
|
|
|
[tasks."actions:update"]
|
|
description = "Update pinned GitHub Actions to latest SHAs"
|
|
run = "pinact run -u"
|
|
tools = { "pinact" = "latest" }
|
|
|
|
[tasks.opentofu]
|
|
run = "tofu"
|
|
dir = "infra/web"
|
|
raw_args = true
|
|
hide = true
|
|
tools = { "opentofu" = "1.11.5" }
|