mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-16 15:45:13 +00:00
3d1eb53708
Co-authored-by: Valentino Hudhra <v.hudhra@gmail.com> Co-authored-by: Valentino Hudhra <2587839+valentin0h@users.noreply.github.com>
85 lines
2.8 KiB
JSON
85 lines
2.8 KiB
JSON
{
|
|
"$schema": "https://turbo.build/schema.json",
|
|
"ui": "stream",
|
|
"globalEnv": ["NODE_ENV", "CI", "ARGOS_*", "GITHUB_*", "GITBOOK_*", "SENTRY_*"],
|
|
"tasks": {
|
|
// Prepare the package for all other tasks
|
|
"generate": {
|
|
"dependsOn": ["^generate"],
|
|
"outputs": ["dist"]
|
|
},
|
|
"@gitbook/icons#generate": {
|
|
"dependsOn": ["^generate"],
|
|
"outputs": ["data/*.json"]
|
|
},
|
|
// Build the package for publishing
|
|
"build": {
|
|
"dependsOn": ["^build", "generate"],
|
|
"outputs": [".next/**", "!.next/cache/**", "dist"]
|
|
},
|
|
// Build the package for v2
|
|
"build:v2": {
|
|
"dependsOn": ["^build:v2", "^build", "generate"],
|
|
"outputs": [".next/**", "!.next/cache/**", "dist"]
|
|
},
|
|
// Build the package for v2 (cloudflare)
|
|
"build:v2:cloudflare": {
|
|
"dependsOn": ["^build:v2:cloudflare", "^build:v2", "generate"],
|
|
"outputs": [".next/**", "!.next/cache/**", "dist", ".open-next/**"]
|
|
},
|
|
// Build the package for Cloudflare Pages
|
|
"build:cloudflare": {
|
|
"dependsOn": ["^build", "generate"],
|
|
"env": ["NEXT_SERVER_ACTIONS_ENCRYPTION_KEY"]
|
|
},
|
|
// Check the package for type errors
|
|
"typecheck": {
|
|
"dependsOn": ["^typecheck", "^build", "generate"]
|
|
},
|
|
// Lint the package for style errors
|
|
"lint": {
|
|
"dependsOn": ["^lint", "generate"]
|
|
},
|
|
// Run unit tests
|
|
"unit": {
|
|
"dependsOn": ["^unit", "^build", "generate"]
|
|
},
|
|
// Run end-to-end tests
|
|
"e2e": {
|
|
"dependsOn": ["^e2e"],
|
|
"env": ["BASE_URL"]
|
|
},
|
|
// Run end-to-end tests for customers
|
|
"e2e-customers": {
|
|
"dependsOn": ["^e2e-customers"],
|
|
"env": ["BASE_URL"]
|
|
},
|
|
// Start the package in development mode
|
|
"dev": {
|
|
"persistent": true,
|
|
"cache": false,
|
|
"dependsOn": ["generate"]
|
|
},
|
|
// Start the package in development mode for v2
|
|
"dev:v2": {
|
|
"persistent": true,
|
|
"cache": false,
|
|
"dependsOn": ["generate"]
|
|
},
|
|
// Script run when the package is deployed
|
|
"release": {
|
|
"dependsOn": ["^release", "build"],
|
|
"env": ["CLOUDFLARE_ACCOUNT_ID", "CLOUDFLARE_API_TOKEN"]
|
|
},
|
|
// Script to run when deploying on main to preview/staging
|
|
"release:preview": {
|
|
"dependsOn": ["^release:preview", "build"],
|
|
"env": ["CLOUDFLARE_ACCOUNT_ID", "CLOUDFLARE_API_TOKEN"]
|
|
},
|
|
// Clean up the package
|
|
"clean": {
|
|
"cache": false
|
|
}
|
|
}
|
|
}
|