turbo.json 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. {
  2. "$schema": "https://turbo.build/schema.json",
  3. "globalEnv": ["NODE_ENV"],
  4. "globalPassThroughEnv": ["COREPACK_HOME"],
  5. "ui": "tui",
  6. "tasks": {
  7. "//#fix": {
  8. "dependsOn": ["//#fix:lint", "//#fix:format"],
  9. "cache": false
  10. },
  11. "//#fix:format": {
  12. "dependsOn": ["//#install:modules", "//#fix:lint"],
  13. "cache": false
  14. },
  15. "//#fix:lint": {
  16. "dependsOn": ["//#install:modules", "^build"],
  17. "cache": false
  18. },
  19. "//#install:modules": {
  20. "inputs": [
  21. "**/package.json",
  22. ".npmrc",
  23. ".npmignore",
  24. "pnpm-workspace.yaml",
  25. "!**/.next/**",
  26. "!**/dist/**"
  27. ],
  28. "outputs": ["pnpm-lock.yaml"]
  29. },
  30. "//#test": {
  31. "dependsOn": [
  32. "//#test:types",
  33. "//#test:unit",
  34. "//#test:integration",
  35. "//#test:format",
  36. "//#test:lint"
  37. ]
  38. },
  39. "//#test:format": {
  40. "dependsOn": ["//#install:modules"]
  41. },
  42. "//#test:lint": {
  43. "dependsOn": ["//#install:modules", "^build"]
  44. },
  45. "//#test:types": {
  46. "dependsOn": ["//#install:modules", "^build"]
  47. },
  48. "//#test:unit": {
  49. "dependsOn": ["//#install:modules", "^build"]
  50. },
  51. "//#test:integration": {
  52. "dependsOn": ["//#install:modules", "^build"]
  53. },
  54. "build": {
  55. "dependsOn": ["//#install:modules", "pull:env", "clean", "^build"],
  56. "inputs": [
  57. "$TURBO_DEFAULT$",
  58. "!README.md",
  59. "!**/*.test.*",
  60. "!jest.config.js",
  61. "!eslint.config.js",
  62. "!prettier.config.js",
  63. "!vercel.json"
  64. ],
  65. "outputs": ["lib/**", "dist/**", ".next/**", "!.next/cache/**"]
  66. },
  67. "build:vercel": {
  68. "dependsOn": ["//#install:modules", "pull:env", "^build"],
  69. "inputs": [
  70. "$TURBO_DEFAULT$",
  71. "!README.md",
  72. "!**/*.test.*",
  73. "!jest.config.js",
  74. "!eslint.config.js",
  75. "!prettier.config.js",
  76. "!vercel.json"
  77. ],
  78. "outputs": ["lib/**", "dist/**", ".next/**", "!.next/cache/**"]
  79. },
  80. "clean": {
  81. "cache": false,
  82. "outputs": []
  83. },
  84. "fix": {
  85. "dependsOn": ["fix:lint", "fix:format"],
  86. "cache": false
  87. },
  88. "fix:format": {
  89. "dependsOn": ["//#install:modules", "fix:lint"],
  90. "cache": false
  91. },
  92. "fix:lint": {
  93. "dependsOn": ["//#install:modules", "^build"],
  94. "cache": false
  95. },
  96. "pull:env": {
  97. "dependsOn": ["//#install:modules"],
  98. "outputs": [".env.local"],
  99. "cache": false
  100. },
  101. "start:dev": {
  102. "dependsOn": ["//#install:modules", "pull:env", "^build"],
  103. "persistent": true,
  104. "cache": false
  105. },
  106. "start:prod": {
  107. "dependsOn": ["//#install:modules", "build"],
  108. "persistent": true,
  109. "cache": false
  110. },
  111. "test": {
  112. "dependsOn": [
  113. "test:types",
  114. "test:unit",
  115. "test:integration",
  116. "test:format",
  117. "test:lint"
  118. ]
  119. },
  120. "test:format": {
  121. "dependsOn": ["//#install:modules"]
  122. },
  123. "test:lint": {
  124. "dependsOn": ["//#install:modules", "^build"]
  125. },
  126. "test:types": {
  127. "dependsOn": ["//#install:modules", "^build"]
  128. },
  129. "test:unit": {
  130. "dependsOn": ["//#install:modules", "^build"]
  131. },
  132. "test:integration": {
  133. "dependsOn": ["//#install:modules", "^build"]
  134. }
  135. }
  136. }