[tasks.install]
run = "pnpm install --filter documentation --frozen-lockfile"

[tasks.start]
env._.path = "./node_modules/.bin"
run = "docusaurus --port 3005"

[tasks.build]
env._.path = "./node_modules/.bin"
run = [
  "jq -c < ../open-api/immich-openapi-specs.json > ./static/openapi.json || exit 0",
  "docusaurus build",
]

[tasks.preview]
env._.path = "./node_modules/.bin"
run = "docusaurus serve"

[tasks.format]
env._.path = "./node_modules/.bin"
run = "prettier --check ."

[tasks."format-fix"]
env._.path = "./node_modules/.bin"
run = "prettier --write ."

[tasks.deploy]
run = "wrangler pages deploy build --project-name=${PROJECT_NAME} --branch=${BRANCH_NAME}"

[tools]
wrangler = "4.66.0"
