Skip to content

Commit

Permalink
Improve tasks coordination
Browse files Browse the repository at this point in the history
  • Loading branch information
SamyPesse committed Jul 26, 2024
1 parent 3caa0fc commit 541429e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"build": "tsc",
"typecheck": "tsc --noEmit",
"dev": "tsc -w",
"postinstall": "node ./bin/gen-list.js"
"prepare": "node ./bin/gen-list.js"
},
"bin": {
"gitbook-icons": "./bin/gitbook-icons.js"
Expand Down
23 changes: 19 additions & 4 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,41 @@
"$schema": "https://turbo.build/schema.json",
"globalEnv": ["NODE_ENV", "CI", "ARGOS_*", "GITHUB_*"],
"tasks": {
// Prepare the package for all other tasks
"prepare": {
"dependsOn": ["^prepare"]
},
"@gitbook/icons#prepare": {
"dependsOn": ["^prepare"],
"outputs": ["data/*.json"]
},
// Build the package for publishing
"build": {
"dependsOn": ["^build"],
"dependsOn": ["^build", "prepare"],
"outputs": [".next/**", "!.next/cache/**", "dist"]
},
// Build the package for Cloudflare Pages
"build:cloudflare": {
"dependsOn": ["^build"]
},
// Check the package for type errors
"typecheck": {
"dependsOn": ["^typecheck", "^build"]
"dependsOn": ["^typecheck", "^build", "prepare"]
},
// Lint the package for style errors
"lint": {
"dependsOn": ["^lint"]
"dependsOn": ["^lint", "prepare"]
},
// Run unit tests
"unit": {
"dependsOn": ["^unit", "^build"]
"dependsOn": ["^unit", "^build", "prepare"]
},
// Run end-to-end tests
"e2e": {
"dependsOn": ["^e2e"],
"env": ["BASE_URL"]
},
// Start the package in development mode
"dev": {
"persistent": true,
"cache": false
Expand Down

0 comments on commit 541429e

Please sign in to comment.